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
cb51e1b6
Commit
cb51e1b6
authored
Jul 26, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add identity Domain
parent
2fddc523
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
0 deletions
+81
-0
User.cs
PSManagement.Domain/Identity/Aggregate/User.cs
+15
-0
AlreadyExistError.cs
...agement.Domain/Identity/DomainErrors/AlreadyExistError.cs
+19
-0
InvalidLoginDataError.cs
...ent.Domain/Identity/DomainErrors/InvalidLoginDataError.cs
+19
-0
UserCreatedEvent.cs
...nagement.Domain/Identity/DomainEvents/UserCreatedEvent.cs
+12
-0
IUsersRepository.cs
...nagement.Domain/Identity/Repositories/IUsersRepository.cs
+16
-0
No files found.
PSManagement.Domain/Identity/Aggregate/User.cs
0 → 100644
View file @
cb51e1b6
using
PSManagement.SharedKernel.Aggregate
;
using
PSManagement.SharedKernel.Entities
;
using
System
;
namespace
PSManagement.Domain.Identity.Aggregate
{
public
class
User
:
IAggregateRoot
{
public
string
Email
{
get
;
set
;
}
public
string
LastName
{
get
;
set
;
}
public
string
FirstName
{
get
;
set
;
}
public
string
HashedPassword
{
get
;
set
;
}
}
}
\ No newline at end of file
PSManagement.Domain/Identity/DomainErrors/AlreadyExistError.cs
0 → 100644
View file @
cb51e1b6
using
FluentResults
;
using
PSManagement.SharedKernel.DomainErrors
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.Domain.Identity.DomainErrors
{
public
class
AlreadyExistError
:
IDomainError
{
public
List
<
IError
>
Reasons
=>
new
(
new
[]
{
new
Error
(
"The User Email Already Exist."
)
});
public
string
Message
=>
"The Email Is Already Exist."
;
public
Dictionary
<
string
,
object
>
Metadata
=>
new
();
}
}
PSManagement.Domain/Identity/DomainErrors/InvalidLoginDataError.cs
0 → 100644
View file @
cb51e1b6
using
FluentResults
;
using
PSManagement.SharedKernel.DomainErrors
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.Domain.Identity.DomainErrors
{
public
class
InvalidLoginDataError
:
IDomainError
{
public
List
<
IError
>
Reasons
=>
new
(
new
[]
{
new
Error
(
"The User Email Or Password Wrong."
)
});
public
string
Message
=>
"Invalid Login Attempt."
;
public
Dictionary
<
string
,
object
>
Metadata
=>
new
();
}
}
PSManagement.Domain/Identity/DomainEvents/UserCreatedEvent.cs
0 → 100644
View file @
cb51e1b6
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.Domain.Identity.DomainEvents
{
public
class
UserCreatedEvent
{
}
}
PSManagement.Domain/Identity/Repositories/IUsersRepository.cs
0 → 100644
View file @
cb51e1b6
using
PSManagement.Domain.Identity.Aggregate
;
using
PSManagement.SharedKernel.Interfaces
;
using
PSManagement.SharedKernel.Repositories
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.Domain.Identity.Repositories
{
public
interface
IUsersRepository
:
IRepository
<
User
>
{
public
Task
<
User
>
GetByEmail
(
string
email
,
ISpecification
<
User
>
specification
=
null
);
}
}
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