Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
ProjectsStatusManagement
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hasan.bahjat
ProjectsStatusManagement
Commits
bdff6c68
Commit
bdff6c68
authored
Aug 10, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update domains
parent
3523f34a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
160 additions
and
49 deletions
+160
-49
Address.cs
PSManagement.Domain/Customers/ValueObjects/Address.cs
+5
-29
FinancialSpending.cs
...nt.Domain/FinancialSpending/Entities/FinancialSpending.cs
+3
-2
IFinancialSpendingRepository.cs
...cialSpending/Repositories/IFinancialSpendingRepository.cs
+11
-0
IFinicialSpendingRepository.cs
...ncialSpending/Repositories/IFinicialSpendingRepository.cs
+0
-8
PSManagement.Domain.csproj
PSManagement.Domain/PSManagement.Domain.csproj
+0
-1
ProjectBuilder.cs
PSManagement.Domain/Projects/Builders/ProjectBuilder.cs
+89
-0
ProjectsErrors.cs
PSManagement.Domain/Projects/DomainErrors/ProjectsErrors.cs
+15
-0
ProjectCreatedEvent.cs
...ement.Domain/Projects/DomainEvents/ProjectCreatedEvent.cs
+3
-4
Project.cs
PSManagement.Domain/Projects/Entities/Project.cs
+29
-2
FinancialFund.cs
PSManagement.Domain/Projects/ValueObjects/FinancialFund.cs
+2
-2
ProjectInfo.cs
PSManagement.Domain/Projects/ValueObjects/ProjectInfo.cs
+3
-1
No files found.
PSManagement.Domain/Customers/ValueObjects/Address.cs
View file @
bdff6c68
...
...
@@ -7,33 +7,9 @@ using System.Threading.Tasks;
namespace
PSManagement.Domain.Customers.ValueObjects
{
public
class
Address
:
ValueObject
{
public
int
StreetNumber
{
get
;
private
set
;
}
public
int
ZipCode
{
get
;
private
set
;
}
public
String
StreetName
{
get
;
private
set
;
}
public
String
City
{
get
;
private
set
;
}
public
Address
()
{
}
public
Address
(
string
city
,
string
streetName
,
int
zipCode
,
int
streetNumber
)
{
City
=
city
;
StreetName
=
streetName
;
ZipCode
=
zipCode
;
StreetNumber
=
streetNumber
;
}
protected
override
IEnumerable
<
object
>
GetEqualityComponents
()
{
yield
return
StreetName
;
yield
return
StreetNumber
;
yield
return
City
;
yield
return
ZipCode
;
}
}
public
record
Address
(
int
StreetNumber
,
int
ZipCode
,
String
StreetName
,
String
City
);
}
PSManagement.Domain/Fin
incialSpending/Entities/Fini
ncialSpending.cs
→
PSManagement.Domain/Fin
ancialSpending/Entities/Fina
ncialSpending.cs
View file @
bdff6c68
...
...
@@ -4,11 +4,12 @@ using System;
namespace
PSManagement.Domain.Projects.Entities
{
public
class
Fin
i
ncialSpending
:
BaseEntity
public
class
Fin
a
ncialSpending
:
BaseEntity
{
public
DateTime
ExpectedSpendingDate
{
get
;
set
;
}
public
String
CostType
{
get
;
set
;
}
public
String
Description
{
get
;
set
;
}
public
Money
LocalPurchase
{
get
;
set
;
}
public
int
LocalPurchase
{
get
;
set
;
}
public
Money
ExternalPurchase
{
get
;
set
;
}
...
...
PSManagement.Domain/FinancialSpending/Repositories/IFinancialSpendingRepository.cs
0 → 100644
View file @
bdff6c68
using
PSManagement.Domain.Projects.Entities
;
using
PSManagement.SharedKernel.Repositories
;
namespace
PSManagement.Domain.FinincialSpending.Repositories
{
public
interface
IFinancialSpendingRepository
:
IRepository
<
FinancialSpending
>
{
}
}
PSManagement.Domain/FinincialSpending/Repositories/IFinicialSpendingRepository.cs
deleted
100644 → 0
View file @
3523f34a
namespace
PSManagement.Domain.FinincialSpending.Repositories
{
public
interface
IFinicialSpendingRepository
{
}
}
PSManagement.Domain/PSManagement.Domain.csproj
View file @
bdff6c68
...
...
@@ -6,7 +6,6 @@
<ItemGroup>
<Folder Include="Identity\ValueObjects\" />
<Folder Include="Projects\DomainErrors\" />
<Folder Include="Reports\Entities\" />
<Folder Include="Reports\Repositories\" />
</ItemGroup>
...
...
PSManagement.Domain/Projects/Builders/ProjectBuilder.cs
0 → 100644
View file @
bdff6c68
using
PSManagement.Domain.Employees.Entities
;
using
PSManagement.Domain.Projects.DomainEvents
;
using
PSManagement.Domain.Projects.Entities
;
using
PSManagement.Domain.Projects.ValueObjects
;
using
PSManagement.Domain.ProjectsStatus.Entites
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.Domain.Projects.Builders
{
public
class
ProjectBuilder
{
private
ProposalInfo
_proposalInfo
;
private
ProjectInfo
_projectInfo
;
private
ProjectStatus
_projectStatus
;
private
FinancialFund
_financialFund
;
private
Aggreement
_projectAggreement
;
// information about who lead and execute the project
private
int
_teamLeaderId
;
private
int
_projectManagerId
;
private
int
_executerId
;
private
int
_proposerId
;
private
ICollection
<
Step
>
_steps
;
private
ICollection
<
Employee
>
_participants
;
private
ICollection
<
Attachment
>
_attachments
;
public
ICollection
<
FinancialSpending
>
FinancialSpending
{
get
;
set
;
}
public
ProjectBuilder
WithProposalInfo
(
ProposalInfo
proposalInfo
)
{
_proposalInfo
=
proposalInfo
;
return
this
;
}
public
ProjectBuilder
WithProjectInfo
(
ProjectInfo
projectInfo
)
{
_projectInfo
=
projectInfo
;
return
this
;
}
public
ProjectBuilder
WithFinancialFund
(
FinancialFund
financialFund
)
{
_financialFund
=
financialFund
;
return
this
;
}
public
ProjectBuilder
WithProjectAggreement
(
Aggreement
projectAggreement
)
{
_projectAggreement
=
projectAggreement
;
return
this
;
}
public
ProjectBuilder
WithAttachment
(
Attachment
[]
attachments
)
{
foreach
(
Attachment
attachment
in
attachments
)
{
_attachments
.
Add
(
attachment
);
}
return
this
;
}
public
Project
Build
()
{
Project
project
=
new
Project
(
_proposalInfo
,
_projectInfo
,
_projectAggreement
,
_proposerId
,
_teamLeaderId
,
_projectManagerId
,
_executerId
);
if
(
_attachments
is
not
null
)
{
foreach
(
Attachment
attachment
in
_attachments
)
{
project
.
AddAttachment
(
attachment
);
}
}
if
(
_steps
is
not
null
)
{
foreach
(
Step
step
in
_steps
)
{
project
.
AddStep
(
step
);
}
}
return
project
;
}
}
}
PSManagement.Domain/Projects/DomainErrors/ProjectsErrors.cs
0 → 100644
View file @
bdff6c68
using
PSManagement.SharedKernel.DomainErrors
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.Domain.Projects.DomainErrors
{
public
class
ProjectsErrors
{
public
static
DomainError
InvalidEntryError
{
get
;
}
=
new
DomainError
(
"Invalid Project Entry."
,
new
DomainError
(
"Invalid Project Data"
));
}
}
PSManagement.Domain/Projects/DomainEvents/ProjectCreatedEvent.cs
View file @
bdff6c68
using
System
;
using
PSManagement.SharedKernel.Events
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -6,7 +7,5 @@ using System.Threading.Tasks;
namespace
PSManagement.Domain.Projects.DomainEvents
{
class
ProjectCreatedEvent
{
}
public
record
ProjectCreatedEvent
(
int
projectId
)
:
IDomainEvent
;
}
PSManagement.Domain/Projects/Entities/Project.cs
View file @
bdff6c68
...
...
@@ -39,13 +39,32 @@ namespace PSManagement.Domain.Projects.Entities
public
ICollection
<
Attachment
>
Attachments
{
get
;
set
;
}
// finincial plan
public
Fin
incialFund
Fini
ncialFund
{
get
;
set
;
}
public
ICollection
<
Fin
incialSpending
>
Fini
ncialSpending
{
get
;
set
;
}
public
Fin
ancialFund
Fina
ncialFund
{
get
;
set
;
}
public
ICollection
<
Fin
ancialSpending
>
Fina
ncialSpending
{
get
;
set
;
}
public
ICollection
<
EmployeeParticipate
>
EmployeeParticipates
{
get
;
set
;
}
public
ICollection
<
Track
>
Tracks
{
get
;
set
;
}
public
void
AddAttachment
(
Attachment
attachment
)
{
Attachments
.
Add
(
attachment
);
}
public
void
AddFinacialSpend
(
FinancialSpending
financialSpending
)
{
FinancialSpending
.
Add
(
financialSpending
);
}
public
void
AddStep
(
Step
step
)
{
Steps
.
Add
(
step
);
}
public
Project
(
ProposalInfo
proposalInfo
,
ProjectInfo
projectInfo
,
...
...
@@ -63,10 +82,18 @@ namespace PSManagement.Domain.Projects.Entities
ExecuterId
=
executerId
;
ProposerId
=
proposerId
;
Attachments
=
new
List
<
Attachment
>();
FinancialSpending
=
new
List
<
FinancialSpending
>();
Steps
=
new
List
<
Step
>();
Participants
=
new
List
<
Employee
>();
EmployeeParticipates
=
new
List
<
EmployeeParticipate
>();
}
public
Project
()
{
}
}
}
PSManagement.Domain/Projects/ValueObjects/Fin
i
ncialFund.cs
→
PSManagement.Domain/Projects/ValueObjects/Fin
a
ncialFund.cs
View file @
bdff6c68
namespace
PSManagement.Domain.Projects.ValueObjects
{
public
record
Fin
i
ncialFund
(
string
Fin
i
cialStatus
,
public
record
Fin
a
ncialFund
(
string
Fin
an
cialStatus
,
string
Source
);
}
PSManagement.Domain/Projects/ValueObjects/ProjectInfo.cs
View file @
bdff6c68
...
...
@@ -5,7 +5,9 @@ namespace PSManagement.Domain.Projects.ValueObjects
public
record
ProjectInfo
(
string
Name
,
string
Code
,
string
Description
string
Description
,
DateTime
StartDate
,
DateTime
ExpectedEndDate
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment