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
1ae9e12a
Commit
1ae9e12a
authored
Jul 28, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Customer Domain.
parent
815af4a2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
15 deletions
+49
-15
Customer.cs
PSManagement.Domain/Customers/Aggregate/Customer.cs
+8
-4
CustomerErrors.cs
PSManagement.Domain/Customers/DomainErrors/CustomerErrors.cs
+14
-0
CutsomerCreatedEvent.cs
...ent.Domain/Customers/DomainEvents/CutsomerCreatedEvent.cs
+14
-0
ContactInfo.cs
PSManagement.Domain/Customers/Entities/ContactInfo.cs
+8
-10
PSManagement.Domain.csproj
PSManagement.Domain/PSManagement.Domain.csproj
+5
-1
No files found.
PSManagement.Domain/Customers/Aggregate/Customer.cs
View file @
1ae9e12a
using
PSManagement.Domain.Customers.Entities
;
using
PSManagement.Domain.Customers.DomainEvents
;
using
PSManagement.Domain.Customers.Entities
;
using
PSManagement.Domain.Customers.ValueObjects
;
using
PSManagement.SharedKernel.Aggregate
;
using
System
;
...
...
@@ -12,6 +13,7 @@ namespace PSManagement.Domain.Customers.Aggregate
{
public
String
CustomerName
{
get
;
set
;
}
public
Address
Address
{
get
;
set
;
}
public
String
Email
{
get
;
set
;
}
public
IEnumerable
<
ContactInfo
>
ContactInfo
{
get
;
private
set
;
}
public
Customer
()
...
...
@@ -19,10 +21,11 @@ namespace PSManagement.Domain.Customers.Aggregate
}
public
Customer
(
String
customerName
,
Address
address
)
public
Customer
(
String
customerName
,
Address
address
,
string
email
)
{
CustomerName
=
customerName
;
Address
=
address
;
Email
=
email
;
}
public
void
AddContactInfo
(
ContactInfo
contactInfo
)
...
...
@@ -31,9 +34,10 @@ namespace PSManagement.Domain.Customers.Aggregate
{
ContactInfo
=
new
List
<
ContactInfo
>();
}
ContactInfo
=
ContactInfo
.
Append
(
contactInfo
);
}
}
}
PSManagement.Domain/Customers/DomainErrors/CustomerErrors.cs
0 → 100644
View file @
1ae9e12a
using
FluentResults
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.Domain.Customers.DomainErrors
{
public
static
class
CustomerErrors
{
public
static
Error
InvalidEntryError
{
get
;
}
=
new
Error
(
"Customer Invalid Entry Erorr."
);
}
}
PSManagement.Domain/Customers/DomainEvents/CutsomerCreatedEvent.cs
0 → 100644
View file @
1ae9e12a
using
PSManagement.SharedKernel.Events
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.Domain.Customers.DomainEvents
{
public
record
CutsomerCreatedEvent
(
int
CustomerId
,
String
CustomerName
):
IDomainEvent
;
}
PSManagement.Domain/Customers/Entities/ContactInfo.cs
View file @
1ae9e12a
...
...
@@ -12,21 +12,19 @@ namespace PSManagement.Domain.Customers.Entities
{
public
sealed
class
ContactInfo
:
BaseEntity
{
public
ContactNumber
PhoneNumber
{
get
;
set
;
}
public
ContactNumber
MobileNumber
{
get
;
set
;
}
public
String
Email
{
get
;
set
;
}
public
String
ContactType
{
get
;
private
set
;
}
public
String
ConatctValue
{
get
;
private
set
;
}
public
ContactInfo
()
public
ContactInfo
(
string
conatctValue
,
string
contactType
)
{
ConatctValue
=
conatctValue
;
ContactType
=
contactType
;
}
public
ContactInfo
(
string
email
,
ContactNumber
mobileNumber
,
ContactNumber
phoneNumer
)
public
ContactInfo
()
{
Email
=
email
;
MobileNumber
=
mobileNumber
;
PhoneNumber
=
phoneNumer
;
}
}
}
}
PSManagement.Domain/PSManagement.Domain.csproj
View file @
1ae9e12a
...
...
@@ -5,9 +5,13 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="Customers\DomainErrors\" />
<Folder Include="Identity\Entities\" />
<Folder Include="Identity\ValueObjects\" />
<Folder Include="Employees\" />
<Folder Include="Departments\" />
<Folder Include="Phases\" />
<Folder Include="ProjectTypes\" />
<Folder Include="Tracking\" />
<Folder Include="Projects\DomainErrors\" />
<Folder Include="Projects\Entities\" />
<Folder Include="Projects\ValueObjects\" />
...
...
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