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
4ac73670
Commit
4ac73670
authored
Aug 06, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix s .
parent
c1f5afe1
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
4463 additions
and
94 deletions
+4463
-94
ContactInfoDTO.cs
PSManagement.Application/Customers/Common/ContactInfoDTO.cs
+1
-1
Employee.cs
PSManagement.Domain/Employees/Entities/Employee.cs
+7
-2
Project.cs
PSManagement.Domain/Projects/Aggregate/Project.cs
+24
-3
EmployeeParticipate.cs
PSManagement.Domain/Projects/Entities/EmployeeParticipate.cs
+17
-0
Step.cs
PSManagement.Domain/Steps/Entities/Step.cs
+5
-3
EmployeeTrack.cs
PSManagement.Domain/Tracking/Entities/EmployeeTrack.cs
+20
-0
StepTrack.cs
PSManagement.Domain/Tracking/Entities/StepTrack.cs
+2
-1
Track.cs
PSManagement.Domain/Tracking/Entities/Track.cs
+4
-2
ProjectEntityConfiguration.cs
...tence/EntitiesConfiguration/ProjectEntityConfiguration.cs
+33
-3
TrackEntityConfiguration.cs
...istence/EntitiesConfiguration/TrackEntityConfiguration.cs
+34
-13
20240806062155_AddDomainUpdate.Designer.cs
...nce/Migrations/20240806062155_AddDomainUpdate.Designer.cs
+915
-0
20240806062155_AddDomainUpdate.cs
....Persistence/Migrations/20240806062155_AddDomainUpdate.cs
+252
-0
20240806125539_AddDomainUpdate2.Designer.cs
...ce/Migrations/20240806125539_AddDomainUpdate2.Designer.cs
+918
-0
20240806125539_AddDomainUpdate2.cs
...Persistence/Migrations/20240806125539_AddDomainUpdate2.cs
+156
-0
20240806132941_AddDomainUpdate3.Designer.cs
...ce/Migrations/20240806132941_AddDomainUpdate3.Designer.cs
+918
-0
20240806132941_AddDomainUpdate3.cs
...Persistence/Migrations/20240806132941_AddDomainUpdate3.cs
+61
-0
20240806133359_AddDomainUpdate4.Designer.cs
...ce/Migrations/20240806133359_AddDomainUpdate4.Designer.cs
+916
-0
20240806133359_AddDomainUpdate4.cs
...Persistence/Migrations/20240806133359_AddDomainUpdate4.cs
+17
-0
AppDbContextModelSnapshot.cs
...cture.Persistence/Migrations/AppDbContextModelSnapshot.cs
+163
-66
No files found.
PSManagement.Application/Customers/Common/ContactInfoDTO.cs
View file @
4ac73670
...
...
@@ -5,7 +5,7 @@ namespace PSManagement.Application.Customers.Common
{
public
class
ContactInfoDTO
{
public
String
Con
at
ctValue
{
get
;
set
;
}
public
String
Con
ta
ctValue
{
get
;
set
;
}
public
String
ContactType
{
get
;
set
;
}
}
...
...
PSManagement.Domain/Employees/Entities/Employee.cs
View file @
4ac73670
using
PSManagement.Domain.Identity.Entities
;
using
PSManagement.Domain.Projects.Aggregate
;
using
PSManagement.Domain.Projects.Entities
;
using
PSManagement.Domain.Tracking
;
using
PSManagement.Domain.Tracking.Entities
;
using
PSManagement.SharedKernel.Aggregate
;
using
PSManagement.SharedKernel.Entities
;
...
...
@@ -17,9 +19,12 @@ namespace PSManagement.Domain.Employees.Entities
public
int
UserId
{
get
;
set
;
}
public
User
User
{
get
;
set
;
}
public
PersonalInfo
PersonalInfo
{
get
;
set
;
}
//public ICollection<Project> Projects { get; set; }
public
ICollection
<
Project
>
Projects
{
get
;
set
;
}
public
ICollection
<
EmployeeTrack
>
EmployeeTracks
{
get
;
set
;
}
public
Availability
Availability
{
get
;
set
;
}
public
ICollection
<
EmployeeWork
>
EmployeeWorks
{
get
;
set
;
}
public
ICollection
<
EmployeeParticipate
>
EmployeeParticipates
{
get
;
set
;
}
public
Employee
()
{
...
...
PSManagement.Domain/Projects/Aggregate/Project.cs
View file @
4ac73670
...
...
@@ -5,6 +5,7 @@ using PSManagement.Domain.ProjectTypes.Entities;
using
PSManagement.Domain.Steps.Entities
;
using
PSManagement.Domain.Tracking
;
using
PSManagement.SharedKernel.Aggregate
;
using
PSManagement.SharedKernel.ValueObjects
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -14,23 +15,43 @@ namespace PSManagement.Domain.Projects.Aggregate
{
public
class
Project
:
IAggregateRoot
{
// information about the project itself
public
ProposalInfo
ProposalInfo
{
get
;
set
;
}
public
ProjectInfo
ProjectInfo
{
get
;
set
;
}
public
ProjectType
ProjectType
{
get
;
set
;
}
//
public ProjectType ProjectType { get; set; }
public
ProjectStatus
ProjectStatus
{
get
;
set
;
}
public
Aggreement
ProjectAggreement
{
get
;
set
;
}
// information about who lead and execute the project
public
int
TeamLeaderId
{
get
;
set
;
}
public
Employee
TeamLeader
{
get
;
set
;
}
public
int
ProjectManagerId
{
get
;
set
;
}
public
Employee
ProjectManager
{
get
;
set
;
}
public
Department
Executer
{
get
;
set
;
}
// the proposer of the project
public
Customer
Proposer
{
get
;
set
;
}
public
ICollection
<
Employee
>
Participants
{
get
;
set
;
}
//
public
ICollection
<
Step
>
Steps
{
get
;
set
;
}
public
ICollection
<
Track
>
Tracks
{
get
;
set
;
}
public
ICollection
<
Employee
>
Participants
{
get
;
set
;
}
public
ICollection
<
Attachment
>
Attachments
{
get
;
set
;
}
// finincial plan
public
FinincialFund
FinincialFund
{
get
;
set
;
}
public
ICollection
<
EmployeeParticipate
>
EmployeeParticipates
{
get
;
set
;
}
public
ICollection
<
Track
>
Tracks
{
get
;
set
;
}
public
Project
()
{
}
}
public
record
FinincialFund
(
string
FinicialStatus
,
string
Source
);
}
PSManagement.Domain/Projects/Entities/EmployeeParticipate.cs
0 → 100644
View file @
4ac73670
using
PSManagement.Domain.Employees.Entities
;
using
PSManagement.Domain.Projects.Aggregate
;
using
PSManagement.SharedKernel.Entities
;
using
System
;
namespace
PSManagement.Domain.Projects.Entities
{
public
class
EmployeeParticipate
:
BaseEntity
{
public
int
EmployeeId
{
get
;
set
;
}
public
int
ProjectId
{
get
;
set
;
}
public
Employee
Employee
{
get
;
set
;
}
public
Project
Project
{
get
;
set
;
}
public
int
PartialTimeRatio
{
get
;
set
;
}
public
string
Role
{
get
;
set
;
}
}
}
PSManagement.Domain/Steps/Entities/Step.cs
View file @
4ac73670
...
...
@@ -17,14 +17,16 @@ namespace PSManagement.Domain.Steps.Entities
public
string
StepName
{
get
;
set
;
}
public
string
Description
{
get
;
set
;
}
public
int
Duration
{
get
;
set
;
}
public
int
CurrentCompletionRatio
{
get
;
set
;
}
public
int
Weight
{
get
;
set
;
}
public
DateTime
StartDate
{
get
;
set
;
}
public
int
ProjectId
{
get
;
set
;
}
public
Project
Project
{
get
;
set
;
}
public
ICollection
<
Item
>
Purchases
{
get
;
set
;
}
public
ICollection
<
Employee
>
Participants
{
get
;
set
;
}
public
ICollection
<
StepTrack
>
StepTracks
{
get
;
set
;
}
//public ICollection<Item> Purchases { get; set; }
//public ICollection<Employee> Participants { get; set; }
public
Step
()
{
...
...
PSManagement.Domain/Tracking/Entities/EmployeeTrack.cs
0 → 100644
View file @
4ac73670
using
PSManagement.Domain.Employees.Entities
;
using
PSManagement.SharedKernel.Entities
;
using
System
;
namespace
PSManagement.Domain.Tracking
{
public
class
EmployeeTrack
:
BaseEntity
{
public
int
EmloyeeId
{
get
;
set
;
}
public
int
TrackId
{
get
;
set
;
}
public
Employee
Employee
{
get
;
set
;
}
public
Track
Track
{
get
;
set
;
}
public
int
WorkingHours
{
get
;
set
;
}
public
String
PerformedWork
{
get
;
set
;
}
public
String
AssignedWork
{
get
;
set
;
}
//public ICollection<EmployeeWork> EmployeeWorks { get; set; }
}
}
PSManagement.Domain/Tracking/Entities/StepTrack.cs
View file @
4ac73670
...
...
@@ -10,7 +10,8 @@ namespace PSManagement.Domain.Tracking.Entities
public
Step
Step
{
get
;
set
;
}
public
int
TrackId
{
get
;
set
;
}
public
Track
Track
{
get
;
set
;
}
public
ICollection
<
EmployeeWork
>
EmployeeWorks
{
get
;
set
;
}
public
int
ExecutionRatio
{
get
;
set
;
}
//public ICollection<EmployeeWork> EmployeeWorks { get; set; }
public
StepTrack
()
{
...
...
PSManagement.Domain/Tracking/Entities/Track.cs
View file @
4ac73670
using
PSManagement.Domain.Projects.Aggregate
;
using
PSManagement.Domain.Employees.Entities
;
using
PSManagement.Domain.Projects.Aggregate
;
using
PSManagement.Domain.Steps.Entities
;
using
PSManagement.Domain.Tracking.Entities
;
using
PSManagement.SharedKernel.Aggregate
;
...
...
@@ -18,7 +19,8 @@ namespace PSManagement.Domain.Tracking
public
int
ProjectId
{
get
;
set
;
}
public
Project
Project
{
get
;
set
;
}
public
ICollection
<
StepTrack
>
StepTracks
{
get
;
set
;
}
public
ICollection
<
Employee
>
TrackedEmployees
{
get
;
set
;
}
public
ICollection
<
EmployeeTrack
>
EmployeeTracks
{
get
;
set
;
}
public
Track
()
{
...
...
PSManagement.Infrastructure.Persistence/EntitiesConfiguration/ProjectEntityConfiguration.cs
View file @
4ac73670
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Metadata.Builders
;
using
PSManagement.Domain.Employees.Entities
;
using
PSManagement.Domain.Projects.Aggregate
;
using
PSManagement.Domain.Projects.Entities
;
namespace
PSManagement.Infrastructure.Persistence.EntitiesConfiguration
{
...
...
@@ -8,6 +10,16 @@ namespace PSManagement.Infrastructure.Persistence.EntitiesConfiguration
{
public
void
Configure
(
EntityTypeBuilder
<
Project
>
builder
)
{
builder
.
HasMany
(
e
=>
e
.
Participants
)
.
WithMany
(
e
=>
e
.
Projects
)
.
UsingEntity
<
EmployeeParticipate
>(
l
=>
l
.
HasOne
<
Employee
>(
e
=>
e
.
Employee
)
.
WithMany
(
e
=>
e
.
EmployeeParticipates
)
.
HasForeignKey
(
e
=>
e
.
EmployeeId
),
r
=>
r
.
HasOne
<
Project
>(
e
=>
e
.
Project
)
.
WithMany
(
e
=>
e
.
EmployeeParticipates
)
.
HasForeignKey
(
e
=>
e
.
ProjectId
)
);
builder
.
OwnsOne
(
c
=>
c
.
ProjectAggreement
,
p
=>
{
...
...
@@ -24,16 +36,34 @@ namespace PSManagement.Infrastructure.Persistence.EntitiesConfiguration
}
);
builder
.
Property
(
e
=>
e
.
Participants
);
builder
.
HasOne
(
e
=>
e
.
TeamLeader
)
.
WithMany
()
.
HasForeignKey
(
e
=>
e
.
TeamLeaderId
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
(
false
);
builder
.
HasOne
(
e
=>
e
.
ProjectManager
)
.
WithMany
()
.
HasForeignKey
(
e
=>
e
.
ProjectManagerId
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
(
false
);
builder
.
OwnsOne
(
c
=>
c
.
ProposalInfo
,
p
=>
{
p
.
Property
(
e
=>
e
.
ProposingBookDate
).
HasColumnName
(
"ProposingBookDate"
);
p
.
Property
(
e
=>
e
.
ProposingBookNumber
).
HasColumnName
(
"ProposingBookNumber"
);
}
);
builder
.
OwnsOne
(
c
=>
c
.
FinincialFund
,
p
=>
{
p
.
Property
(
e
=>
e
.
FinicialStatus
).
HasColumnName
(
"FinicialStatus"
);
p
.
Property
(
e
=>
e
.
Source
).
HasColumnName
(
"FinicialSource"
);
}
);
builder
.
HasMany
(
e
=>
e
.
Tracks
).
WithOne
(
e
=>
e
.
Project
).
HasForeignKey
(
e
=>
e
.
ProjectId
);
builder
.
HasOne
(
e
=>
e
.
ProjectType
).
WithMany
(
r
=>
r
.
Projects
);
builder
.
Ignore
(
e
=>
e
.
Participants
);
}
}
}
PSManagement.Infrastructure.Persistence/EntitiesConfiguration/TrackEntityConfiguration.cs
View file @
4ac73670
...
...
@@ -7,8 +7,10 @@ namespace PSManagement.Infrastructure.Persistence.EntitiesConfiguration
{
public
class
TrackEntityConfiguration
:
IEntityTypeConfiguration
<
Track
>
,
IEntityTypeConfiguration
<
StepTrack
>,
IEntityTypeConfiguration
<
EmployeeWork
>
IEntityTypeConfiguration
<
StepTrack
>,
IEntityTypeConfiguration
<
EmployeeTrack
>
//,
//IEntityTypeConfiguration<EmployeeWork>
{
...
...
@@ -19,7 +21,16 @@ namespace PSManagement.Infrastructure.Persistence.EntitiesConfiguration
.
WithMany
(
p
=>
p
.
Tracks
)
.
HasForeignKey
(
t
=>
t
.
ProjectId
)
.
OnDelete
(
DeleteBehavior
.
Restrict
);
//builder.HasMany(e => e.TrackedEmployees)
// .WithMany(e => e.trac)
// .UsingEntity<EmployeeParticipate>(
// l => l.HasOne<Employee>(e => e.Employee)
// .WithMany(e => e.EmployeeParticipates)
// .HasForeignKey(e => e.EmployeeId),
// r => r.HasOne<Project>(e => e.Project)
// .WithMany(e => e.EmployeeParticipates)
// .HasForeignKey(e => e.ProjectId)
// );
}
public
void
Configure
(
EntityTypeBuilder
<
StepTrack
>
builder
)
{
...
...
@@ -36,20 +47,30 @@ namespace PSManagement.Infrastructure.Persistence.EntitiesConfiguration
}
public
void
Configure
(
EntityTypeBuilder
<
EmployeeWork
>
builder
)
public
void
Configure
(
EntityTypeBuilder
<
EmployeeTrack
>
builder
)
{
builder
.
HasOne
(
ew
=>
ew
.
StepTrack
)
.
WithMany
(
st
=>
st
.
EmployeeWorks
)
.
HasForeignKey
(
ew
=>
ew
.
StepTrackId
)
.
OnDelete
(
DeleteBehavior
.
Restrict
);
;
builder
.
HasOne
(
st
=>
st
.
Employee
)
.
WithMany
(
s
=>
s
.
EmployeeTracks
)
.
HasForeignKey
(
st
=>
st
.
EmloyeeId
)
;
}
//public void Configure(EntityTypeBuilder<EmployeeWork> builder)
//{
// //builder.HasOne(ew => ew.StepTrack)
// //.WithMany(st => st.EmployeeWorks)
// //.HasForeignKey(ew => ew.StepTrackId)
// // .OnDelete(DeleteBehavior.Restrict); ;
builder
.
HasOne
(
ew
=>
ew
.
Employee
)
.
WithMany
(
e
=>
e
.
EmployeeWorks
)
.
HasForeignKey
(
ew
=>
ew
.
EmployeeId
)
.
OnDelete
(
DeleteBehavior
.
Restrict
);
;
// builder.HasOne(ew => ew.Employee)
// .WithMany(e => e.EmployeeWorks)
// .HasForeignKey(ew => ew.EmployeeId)
// .OnDelete(DeleteBehavior.Restrict); ;
}
//}
}
}
PSManagement.Infrastructure.Persistence/Migrations/20240806062155_AddDomainUpdate.Designer.cs
0 → 100644
View file @
4ac73670
// <auto-generated />
using
System
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Infrastructure
;
using
Microsoft.EntityFrameworkCore.Metadata
;
using
Microsoft.EntityFrameworkCore.Migrations
;
using
Microsoft.EntityFrameworkCore.Storage.ValueConversion
;
using
PSManagement.Infrastructure.Persistence
;
namespace
PSManagement.Infrastructure.Persistence.Migrations
{
[
DbContext
(
typeof
(
AppDbContext
))]
[
Migration
(
"20240806062155_AddDomainUpdate"
)]
partial
class
AddDomainUpdate
{
protected
override
void
BuildTargetModel
(
ModelBuilder
modelBuilder
)
{
#pragma warning disable 612, 618
modelBuilder
.
HasAnnotation
(
"Relational:Collation"
,
"Arabic_CI_AS"
)
.
HasAnnotation
(
"Relational:MaxIdentifierLength"
,
128
)
.
HasAnnotation
(
"ProductVersion"
,
"5.0.17"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"CustomerName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Email"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Customers"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Department"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Departments"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"HIASTId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"UserId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"TrackId"
);
b
.
HasIndex
(
"UserId"
)
.
IsUnique
();
b
.
ToTable
(
"Employees"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.Permission"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Permission"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.Role"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Roles"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.User"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Email"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"HashedPassword"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"UserName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Users"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.ProjectTypes.Entities.ProjectType"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"TypeName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"WorkerCount"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"ProjectType"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
?>(
"ExecuterId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProjectStatusId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProjectTypeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProposerId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"TeamLeaderId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ExecuterId"
);
b
.
HasIndex
(
"ProjectStatusId"
);
b
.
HasIndex
(
"ProjectTypeId"
);
b
.
HasIndex
(
"ProposerId"
);
b
.
HasIndex
(
"TeamLeaderId"
);
b
.
ToTable
(
"Projects"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.Attachment"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"AttachmenDescription"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"AttachmentName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"AttachmentUrl"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Attachment"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.EmployeeParticipate"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"EmployeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"PartialTimeRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Role"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmployeeId"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"EmployeeParticipate"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.ProjectStatus"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Code"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Details"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"ProjectStatus"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Item"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"ItemDescription"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"ItemName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Items"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"CurrentCompletionRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"Duration"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
DateTime
>(
"StartDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
string
>(
"StepName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"Weight"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Steps"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.EmployeeTrack"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"AssignedWork"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"EmloyeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"PerformedWork"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"WorkingHours"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmloyeeId"
);
b
.
HasIndex
(
"TrackId"
);
b
.
ToTable
(
"EmployeeTrack"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.EmployeeWork"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ContributingRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"EmployeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"EmployeeWorkId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"HoursWorked"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Notes"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"StepTrackId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmployeeId"
);
b
.
HasIndex
(
"StepTrackId"
);
b
.
ToTable
(
"EmployeeWorks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ExecutionRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"StepId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"StepId"
);
b
.
HasIndex
(
"TrackId"
);
b
.
ToTable
(
"StepTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
DateTime
>(
"TrackDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
string
>(
"TrackNote"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Tracks"
);
});
modelBuilder
.
Entity
(
"PermissionRole"
,
b
=>
{
b
.
Property
<
int
>(
"PermissionsId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"RolesId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"PermissionsId"
,
"RolesId"
);
b
.
HasIndex
(
"RolesId"
);
b
.
ToTable
(
"PermissionRole"
);
});
modelBuilder
.
Entity
(
"RoleUser"
,
b
=>
{
b
.
Property
<
int
>(
"RolesId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"UsersId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"RolesId"
,
"UsersId"
);
b
.
HasIndex
(
"UsersId"
);
b
.
ToTable
(
"RoleUser"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
OwnsMany
(
"PSManagement.Domain.Customers.Entities.ContactInfo"
,
"ContactInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"CustomerId"
)
.
HasColumnType
(
"int"
);
b1
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"ContactType"
)
.
HasColumnType
(
"nvarchar(max)"
);
b1
.
Property
<
string
>(
"ContactValue"
)
.
HasColumnType
(
"nvarchar(max)"
);
b1
.
HasKey
(
"CustomerId"
,
"Id"
);
b1
.
ToTable
(
"ContactInfo"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"CustomerId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Customers.ValueObjects.Address"
,
"Address"
,
b1
=>
{
b1
.
Property
<
int
>(
"CustomerId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"City"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"City"
);
b1
.
Property
<
string
>(
"StreetName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"StreetName"
);
b1
.
Property
<
int
>(
"StreetNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"StreetNumber"
);
b1
.
Property
<
int
>(
"ZipCode"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"ZipCode"
);
b1
.
HasKey
(
"CustomerId"
);
b1
.
ToTable
(
"Customers"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"CustomerId"
);
});
b
.
Navigation
(
"Address"
);
b
.
Navigation
(
"ContactInfo"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
null
)
.
WithMany
(
"TrackedEmployees"
)
.
HasForeignKey
(
"TrackId"
);
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.User"
,
"User"
)
.
WithOne
(
"Employee"
)
.
HasForeignKey
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"UserId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
OwnsOne
(
"PSManagement.Domain.Employees.Entities.Availability"
,
"Availability"
,
b1
=>
{
b1
.
Property
<
int
>(
"EmployeeId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
int
>(
"CurrentWorkingHours"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"CurrentWorkingHours"
);
b1
.
Property
<
bool
>(
"IsAvailable"
)
.
HasColumnType
(
"bit"
)
.
HasColumnName
(
"IsAvailable"
);
b1
.
HasKey
(
"EmployeeId"
);
b1
.
ToTable
(
"Employees"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"EmployeeId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Employees.Entities.PersonalInfo"
,
"PersonalInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"EmployeeId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"FirstName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FirstName"
);
b1
.
Property
<
string
>(
"LastName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"LastName"
);
b1
.
HasKey
(
"EmployeeId"
);
b1
.
ToTable
(
"Employees"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"EmployeeId"
);
});
b
.
Navigation
(
"Availability"
);
b
.
Navigation
(
"PersonalInfo"
);
b
.
Navigation
(
"User"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Department"
,
"Executer"
)
.
WithMany
()
.
HasForeignKey
(
"ExecuterId"
);
b
.
HasOne
(
"PSManagement.Domain.Projects.Entities.ProjectStatus"
,
"ProjectStatus"
)
.
WithMany
()
.
HasForeignKey
(
"ProjectStatusId"
);
b
.
HasOne
(
"PSManagement.Domain.ProjectTypes.Entities.ProjectType"
,
"ProjectType"
)
.
WithMany
(
"Projects"
)
.
HasForeignKey
(
"ProjectTypeId"
);
b
.
HasOne
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
"Proposer"
)
.
WithMany
(
"Projects"
)
.
HasForeignKey
(
"ProposerId"
);
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"TeamLeader"
)
.
WithMany
()
.
HasForeignKey
(
"TeamLeaderId"
);
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.Aggreement"
,
"ProjectAggreement"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
DateTime
>(
"AggreementDate"
)
.
HasColumnType
(
"datetime2"
)
.
HasColumnName
(
"AggreementDate"
);
b1
.
Property
<
int
>(
"AggreementNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"AggreementNumber"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.ProjectInfo"
,
"ProjectInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"Code"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Code"
);
b1
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Description"
);
b1
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Name"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.ProposalInfo"
,
"ProposalInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
DateTime
>(
"ProposingBookDate"
)
.
HasColumnType
(
"datetime2"
)
.
HasColumnName
(
"ProposingBookDate"
);
b1
.
Property
<
int
>(
"ProposingBookNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"ProposingBookNumber"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
Navigation
(
"Executer"
);
b
.
Navigation
(
"ProjectAggreement"
);
b
.
Navigation
(
"ProjectInfo"
);
b
.
Navigation
(
"ProjectStatus"
);
b
.
Navigation
(
"ProjectType"
);
b
.
Navigation
(
"ProposalInfo"
);
b
.
Navigation
(
"Proposer"
);
b
.
Navigation
(
"TeamLeader"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.Attachment"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
null
)
.
WithMany
(
"Attachments"
)
.
HasForeignKey
(
"ProjectId"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.EmployeeParticipate"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeParticipates"
)
.
HasForeignKey
(
"EmployeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"EmployeeParticipates"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Item"
,
b
=>
{
b
.
OwnsOne
(
"PSManagement.SharedKernel.ValueObjects.Money"
,
"Price"
,
b1
=>
{
b1
.
Property
<
int
>(
"ItemId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
int
>(
"Ammount"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"Ammount"
);
b1
.
Property
<
string
>(
"Currency"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Currency"
);
b1
.
HasKey
(
"ItemId"
);
b1
.
ToTable
(
"Items"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ItemId"
);
});
b
.
Navigation
(
"Price"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"Steps"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.EmployeeTrack"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeTracks"
)
.
HasForeignKey
(
"EmloyeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
"Track"
)
.
WithMany
(
"EmployeeTracks"
)
.
HasForeignKey
(
"TrackId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"Track"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.EmployeeWork"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
()
.
HasForeignKey
(
"EmployeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
"StepTrack"
)
.
WithMany
()
.
HasForeignKey
(
"StepTrackId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"StepTrack"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Steps.Entities.Step"
,
"Step"
)
.
WithMany
(
"StepTracks"
)
.
HasForeignKey
(
"StepId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
"Track"
)
.
WithMany
(
"StepTracks"
)
.
HasForeignKey
(
"TrackId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
Navigation
(
"Step"
);
b
.
Navigation
(
"Track"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"Tracks"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PermissionRole"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Permission"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"PermissionsId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Role"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"RolesId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
});
modelBuilder
.
Entity
(
"RoleUser"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Role"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"RolesId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.User"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"UsersId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
Navigation
(
"Projects"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
Navigation
(
"EmployeeParticipates"
);
b
.
Navigation
(
"EmployeeTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.User"
,
b
=>
{
b
.
Navigation
(
"Employee"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.ProjectTypes.Entities.ProjectType"
,
b
=>
{
b
.
Navigation
(
"Projects"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
Navigation
(
"Attachments"
);
b
.
Navigation
(
"EmployeeParticipates"
);
b
.
Navigation
(
"Steps"
);
b
.
Navigation
(
"Tracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
Navigation
(
"StepTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
Navigation
(
"EmployeeTracks"
);
b
.
Navigation
(
"StepTracks"
);
b
.
Navigation
(
"TrackedEmployees"
);
});
#pragma warning restore 612, 618
}
}
}
PSManagement.Infrastructure.Persistence/Migrations/20240806062155_AddDomainUpdate.cs
0 → 100644
View file @
4ac73670
using
Microsoft.EntityFrameworkCore.Migrations
;
namespace
PSManagement.Infrastructure.Persistence.Migrations
{
public
partial
class
AddDomainUpdate
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Employees_Steps_StepId"
,
table
:
"Employees"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_EmployeeWorks_Employees_EmployeeId"
,
table
:
"EmployeeWorks"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_EmployeeWorks_StepTracks_StepTrackId"
,
table
:
"EmployeeWorks"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Items_Steps_StepId"
,
table
:
"Items"
);
migrationBuilder
.
DropIndex
(
name
:
"IX_Items_StepId"
,
table
:
"Items"
);
migrationBuilder
.
DropColumn
(
name
:
"StepId"
,
table
:
"Items"
);
migrationBuilder
.
RenameColumn
(
name
:
"StepId"
,
table
:
"Employees"
,
newName
:
"TrackId"
);
migrationBuilder
.
RenameIndex
(
name
:
"IX_Employees_StepId"
,
table
:
"Employees"
,
newName
:
"IX_Employees_TrackId"
);
migrationBuilder
.
AddColumn
<
int
>(
name
:
"ExecutionRatio"
,
table
:
"StepTracks"
,
type
:
"int"
,
nullable
:
false
,
defaultValue
:
0
);
migrationBuilder
.
AddColumn
<
int
>(
name
:
"CurrentCompletionRatio"
,
table
:
"Steps"
,
type
:
"int"
,
nullable
:
false
,
defaultValue
:
0
);
migrationBuilder
.
AddColumn
<
int
>(
name
:
"Weight"
,
table
:
"Steps"
,
type
:
"int"
,
nullable
:
false
,
defaultValue
:
0
);
migrationBuilder
.
CreateTable
(
name
:
"EmployeeParticipate"
,
columns
:
table
=>
new
{
Id
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
false
)
.
Annotation
(
"SqlServer:Identity"
,
"1, 1"
),
EmployeeId
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
false
),
ProjectId
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
false
),
PartialTimeRatio
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
false
),
Role
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
)
},
constraints
:
table
=>
{
table
.
PrimaryKey
(
"PK_EmployeeParticipate"
,
x
=>
x
.
Id
);
table
.
ForeignKey
(
name
:
"FK_EmployeeParticipate_Employees_EmployeeId"
,
column
:
x
=>
x
.
EmployeeId
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
table
.
ForeignKey
(
name
:
"FK_EmployeeParticipate_Projects_ProjectId"
,
column
:
x
=>
x
.
ProjectId
,
principalTable
:
"Projects"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
});
migrationBuilder
.
CreateTable
(
name
:
"EmployeeTrack"
,
columns
:
table
=>
new
{
Id
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
false
)
.
Annotation
(
"SqlServer:Identity"
,
"1, 1"
),
EmloyeeId
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
false
),
TrackId
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
false
),
WorkingHours
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
false
),
PerformedWork
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
AssignedWork
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
)
},
constraints
:
table
=>
{
table
.
PrimaryKey
(
"PK_EmployeeTrack"
,
x
=>
x
.
Id
);
table
.
ForeignKey
(
name
:
"FK_EmployeeTrack_Employees_EmloyeeId"
,
column
:
x
=>
x
.
EmloyeeId
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
table
.
ForeignKey
(
name
:
"FK_EmployeeTrack_Tracks_TrackId"
,
column
:
x
=>
x
.
TrackId
,
principalTable
:
"Tracks"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
});
migrationBuilder
.
CreateIndex
(
name
:
"IX_EmployeeParticipate_EmployeeId"
,
table
:
"EmployeeParticipate"
,
column
:
"EmployeeId"
);
migrationBuilder
.
CreateIndex
(
name
:
"IX_EmployeeParticipate_ProjectId"
,
table
:
"EmployeeParticipate"
,
column
:
"ProjectId"
);
migrationBuilder
.
CreateIndex
(
name
:
"IX_EmployeeTrack_EmloyeeId"
,
table
:
"EmployeeTrack"
,
column
:
"EmloyeeId"
);
migrationBuilder
.
CreateIndex
(
name
:
"IX_EmployeeTrack_TrackId"
,
table
:
"EmployeeTrack"
,
column
:
"TrackId"
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Employees_Tracks_TrackId"
,
table
:
"Employees"
,
column
:
"TrackId"
,
principalTable
:
"Tracks"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Restrict
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_EmployeeWorks_Employees_EmployeeId"
,
table
:
"EmployeeWorks"
,
column
:
"EmployeeId"
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_EmployeeWorks_StepTracks_StepTrackId"
,
table
:
"EmployeeWorks"
,
column
:
"StepTrackId"
,
principalTable
:
"StepTracks"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Employees_Tracks_TrackId"
,
table
:
"Employees"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_EmployeeWorks_Employees_EmployeeId"
,
table
:
"EmployeeWorks"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_EmployeeWorks_StepTracks_StepTrackId"
,
table
:
"EmployeeWorks"
);
migrationBuilder
.
DropTable
(
name
:
"EmployeeParticipate"
);
migrationBuilder
.
DropTable
(
name
:
"EmployeeTrack"
);
migrationBuilder
.
DropColumn
(
name
:
"ExecutionRatio"
,
table
:
"StepTracks"
);
migrationBuilder
.
DropColumn
(
name
:
"CurrentCompletionRatio"
,
table
:
"Steps"
);
migrationBuilder
.
DropColumn
(
name
:
"Weight"
,
table
:
"Steps"
);
migrationBuilder
.
RenameColumn
(
name
:
"TrackId"
,
table
:
"Employees"
,
newName
:
"StepId"
);
migrationBuilder
.
RenameIndex
(
name
:
"IX_Employees_TrackId"
,
table
:
"Employees"
,
newName
:
"IX_Employees_StepId"
);
migrationBuilder
.
AddColumn
<
int
>(
name
:
"StepId"
,
table
:
"Items"
,
type
:
"int"
,
nullable
:
true
);
migrationBuilder
.
CreateIndex
(
name
:
"IX_Items_StepId"
,
table
:
"Items"
,
column
:
"StepId"
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Employees_Steps_StepId"
,
table
:
"Employees"
,
column
:
"StepId"
,
principalTable
:
"Steps"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Restrict
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_EmployeeWorks_Employees_EmployeeId"
,
table
:
"EmployeeWorks"
,
column
:
"EmployeeId"
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Restrict
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_EmployeeWorks_StepTracks_StepTrackId"
,
table
:
"EmployeeWorks"
,
column
:
"StepTrackId"
,
principalTable
:
"StepTracks"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Restrict
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Items_Steps_StepId"
,
table
:
"Items"
,
column
:
"StepId"
,
principalTable
:
"Steps"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Restrict
);
}
}
}
PSManagement.Infrastructure.Persistence/Migrations/20240806125539_AddDomainUpdate2.Designer.cs
0 → 100644
View file @
4ac73670
// <auto-generated />
using
System
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Infrastructure
;
using
Microsoft.EntityFrameworkCore.Metadata
;
using
Microsoft.EntityFrameworkCore.Migrations
;
using
Microsoft.EntityFrameworkCore.Storage.ValueConversion
;
using
PSManagement.Infrastructure.Persistence
;
namespace
PSManagement.Infrastructure.Persistence.Migrations
{
[
DbContext
(
typeof
(
AppDbContext
))]
[
Migration
(
"20240806125539_AddDomainUpdate2"
)]
partial
class
AddDomainUpdate2
{
protected
override
void
BuildTargetModel
(
ModelBuilder
modelBuilder
)
{
#pragma warning disable 612, 618
modelBuilder
.
HasAnnotation
(
"Relational:Collation"
,
"Arabic_CI_AS"
)
.
HasAnnotation
(
"Relational:MaxIdentifierLength"
,
128
)
.
HasAnnotation
(
"ProductVersion"
,
"5.0.17"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"CustomerName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Email"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Customers"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Department"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Departments"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"HIASTId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"UserId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"TrackId"
);
b
.
HasIndex
(
"UserId"
)
.
IsUnique
();
b
.
ToTable
(
"Employees"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.Permission"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Permission"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.Role"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Roles"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.User"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Email"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"HashedPassword"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"UserName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Users"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
?>(
"ExecuterId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectManagerId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProjectStatusId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProposerId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"TeamLeaderId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ExecuterId"
);
b
.
HasIndex
(
"ProjectManagerId"
);
b
.
HasIndex
(
"ProjectStatusId"
);
b
.
HasIndex
(
"ProposerId"
);
b
.
HasIndex
(
"TeamLeaderId"
);
b
.
ToTable
(
"Projects"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.Attachment"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"AttachmenDescription"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"AttachmentName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"AttachmentUrl"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Attachment"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.EmployeeParticipate"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"EmployeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"PartialTimeRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Role"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmployeeId"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"EmployeeParticipate"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.ProjectStatus"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Code"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Details"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"ProjectStatus"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Item"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"ItemDescription"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"ItemName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Items"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"CurrentCompletionRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"Duration"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
DateTime
>(
"StartDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
string
>(
"StepName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"Weight"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Steps"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.EmployeeTrack"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"AssignedWork"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"EmloyeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"PerformedWork"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"WorkingHours"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmloyeeId"
);
b
.
HasIndex
(
"TrackId"
);
b
.
ToTable
(
"EmployeeTrack"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.EmployeeWork"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ContributingRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"EmployeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"EmployeeWorkId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"HoursWorked"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Notes"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"StepTrackId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmployeeId"
);
b
.
HasIndex
(
"StepTrackId"
);
b
.
ToTable
(
"EmployeeWorks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ExecutionRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"StepId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"StepId"
);
b
.
HasIndex
(
"TrackId"
);
b
.
ToTable
(
"StepTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
DateTime
>(
"TrackDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
string
>(
"TrackNote"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Tracks"
);
});
modelBuilder
.
Entity
(
"PermissionRole"
,
b
=>
{
b
.
Property
<
int
>(
"PermissionsId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"RolesId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"PermissionsId"
,
"RolesId"
);
b
.
HasIndex
(
"RolesId"
);
b
.
ToTable
(
"PermissionRole"
);
});
modelBuilder
.
Entity
(
"RoleUser"
,
b
=>
{
b
.
Property
<
int
>(
"RolesId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"UsersId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"RolesId"
,
"UsersId"
);
b
.
HasIndex
(
"UsersId"
);
b
.
ToTable
(
"RoleUser"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
OwnsMany
(
"PSManagement.Domain.Customers.Entities.ContactInfo"
,
"ContactInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"CustomerId"
)
.
HasColumnType
(
"int"
);
b1
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"ContactType"
)
.
HasColumnType
(
"nvarchar(max)"
);
b1
.
Property
<
string
>(
"ContactValue"
)
.
HasColumnType
(
"nvarchar(max)"
);
b1
.
HasKey
(
"CustomerId"
,
"Id"
);
b1
.
ToTable
(
"ContactInfo"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"CustomerId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Customers.ValueObjects.Address"
,
"Address"
,
b1
=>
{
b1
.
Property
<
int
>(
"CustomerId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"City"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"City"
);
b1
.
Property
<
string
>(
"StreetName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"StreetName"
);
b1
.
Property
<
int
>(
"StreetNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"StreetNumber"
);
b1
.
Property
<
int
>(
"ZipCode"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"ZipCode"
);
b1
.
HasKey
(
"CustomerId"
);
b1
.
ToTable
(
"Customers"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"CustomerId"
);
});
b
.
Navigation
(
"Address"
);
b
.
Navigation
(
"ContactInfo"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
null
)
.
WithMany
(
"TrackedEmployees"
)
.
HasForeignKey
(
"TrackId"
);
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.User"
,
"User"
)
.
WithOne
(
"Employee"
)
.
HasForeignKey
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"UserId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
OwnsOne
(
"PSManagement.Domain.Employees.Entities.Availability"
,
"Availability"
,
b1
=>
{
b1
.
Property
<
int
>(
"EmployeeId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
int
>(
"CurrentWorkingHours"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"CurrentWorkingHours"
);
b1
.
Property
<
bool
>(
"IsAvailable"
)
.
HasColumnType
(
"bit"
)
.
HasColumnName
(
"IsAvailable"
);
b1
.
HasKey
(
"EmployeeId"
);
b1
.
ToTable
(
"Employees"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"EmployeeId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Employees.Entities.PersonalInfo"
,
"PersonalInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"EmployeeId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"FirstName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FirstName"
);
b1
.
Property
<
string
>(
"LastName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"LastName"
);
b1
.
HasKey
(
"EmployeeId"
);
b1
.
ToTable
(
"Employees"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"EmployeeId"
);
});
b
.
Navigation
(
"Availability"
);
b
.
Navigation
(
"PersonalInfo"
);
b
.
Navigation
(
"User"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Department"
,
"Executer"
)
.
WithMany
()
.
HasForeignKey
(
"ExecuterId"
);
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"ProjectManager"
)
.
WithMany
()
.
HasForeignKey
(
"ProjectManagerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Projects.Entities.ProjectStatus"
,
"ProjectStatus"
)
.
WithMany
()
.
HasForeignKey
(
"ProjectStatusId"
);
b
.
HasOne
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
"Proposer"
)
.
WithMany
(
"Projects"
)
.
HasForeignKey
(
"ProposerId"
);
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"TeamLeader"
)
.
WithMany
()
.
HasForeignKey
(
"TeamLeaderId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.Aggreement"
,
"ProjectAggreement"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
DateTime
>(
"AggreementDate"
)
.
HasColumnType
(
"datetime2"
)
.
HasColumnName
(
"AggreementDate"
);
b1
.
Property
<
int
>(
"AggreementNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"AggreementNumber"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.FinincialFund"
,
"FinincialFund"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"FinicialStatus"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FinicialStatus"
);
b1
.
Property
<
string
>(
"Source"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FinicialSource"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.ProjectInfo"
,
"ProjectInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"Code"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Code"
);
b1
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Description"
);
b1
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Name"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.ProposalInfo"
,
"ProposalInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
DateTime
>(
"ProposingBookDate"
)
.
HasColumnType
(
"datetime2"
)
.
HasColumnName
(
"ProposingBookDate"
);
b1
.
Property
<
int
>(
"ProposingBookNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"ProposingBookNumber"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
Navigation
(
"Executer"
);
b
.
Navigation
(
"FinincialFund"
);
b
.
Navigation
(
"ProjectAggreement"
);
b
.
Navigation
(
"ProjectInfo"
);
b
.
Navigation
(
"ProjectManager"
);
b
.
Navigation
(
"ProjectStatus"
);
b
.
Navigation
(
"ProposalInfo"
);
b
.
Navigation
(
"Proposer"
);
b
.
Navigation
(
"TeamLeader"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.Attachment"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
null
)
.
WithMany
(
"Attachments"
)
.
HasForeignKey
(
"ProjectId"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.EmployeeParticipate"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeParticipates"
)
.
HasForeignKey
(
"EmployeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"EmployeeParticipates"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Item"
,
b
=>
{
b
.
OwnsOne
(
"PSManagement.SharedKernel.ValueObjects.Money"
,
"Price"
,
b1
=>
{
b1
.
Property
<
int
>(
"ItemId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
int
>(
"Ammount"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"Ammount"
);
b1
.
Property
<
string
>(
"Currency"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Currency"
);
b1
.
HasKey
(
"ItemId"
);
b1
.
ToTable
(
"Items"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ItemId"
);
});
b
.
Navigation
(
"Price"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"Steps"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.EmployeeTrack"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeTracks"
)
.
HasForeignKey
(
"EmloyeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
"Track"
)
.
WithMany
(
"EmployeeTracks"
)
.
HasForeignKey
(
"TrackId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"Track"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.EmployeeWork"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
()
.
HasForeignKey
(
"EmployeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
"StepTrack"
)
.
WithMany
()
.
HasForeignKey
(
"StepTrackId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"StepTrack"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Steps.Entities.Step"
,
"Step"
)
.
WithMany
(
"StepTracks"
)
.
HasForeignKey
(
"StepId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
"Track"
)
.
WithMany
(
"StepTracks"
)
.
HasForeignKey
(
"TrackId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
Navigation
(
"Step"
);
b
.
Navigation
(
"Track"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"Tracks"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PermissionRole"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Permission"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"PermissionsId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Role"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"RolesId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
});
modelBuilder
.
Entity
(
"RoleUser"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Role"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"RolesId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.User"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"UsersId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
Navigation
(
"Projects"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
Navigation
(
"EmployeeParticipates"
);
b
.
Navigation
(
"EmployeeTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.User"
,
b
=>
{
b
.
Navigation
(
"Employee"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
Navigation
(
"Attachments"
);
b
.
Navigation
(
"EmployeeParticipates"
);
b
.
Navigation
(
"Steps"
);
b
.
Navigation
(
"Tracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
Navigation
(
"StepTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
Navigation
(
"EmployeeTracks"
);
b
.
Navigation
(
"StepTracks"
);
b
.
Navigation
(
"TrackedEmployees"
);
});
#pragma warning restore 612, 618
}
}
}
PSManagement.Infrastructure.Persistence/Migrations/20240806125539_AddDomainUpdate2.cs
0 → 100644
View file @
4ac73670
using
Microsoft.EntityFrameworkCore.Migrations
;
namespace
PSManagement.Infrastructure.Persistence.Migrations
{
public
partial
class
AddDomainUpdate2
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Projects_Employees_TeamLeaderId"
,
table
:
"Projects"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Projects_ProjectType_ProjectTypeId"
,
table
:
"Projects"
);
migrationBuilder
.
DropTable
(
name
:
"ProjectType"
);
migrationBuilder
.
DropIndex
(
name
:
"IX_Projects_ProjectTypeId"
,
table
:
"Projects"
);
migrationBuilder
.
DropColumn
(
name
:
"ProjectTypeId"
,
table
:
"Projects"
);
migrationBuilder
.
AlterColumn
<
int
>(
name
:
"TeamLeaderId"
,
table
:
"Projects"
,
type
:
"int"
,
nullable
:
false
,
defaultValue
:
0
,
oldClrType
:
typeof
(
int
),
oldType
:
"int"
,
oldNullable
:
true
);
migrationBuilder
.
AddColumn
<
string
>(
name
:
"FinicialSource"
,
table
:
"Projects"
,
type
:
"nvarchar(max)"
,
nullable
:
true
);
migrationBuilder
.
AddColumn
<
string
>(
name
:
"FinicialStatus"
,
table
:
"Projects"
,
type
:
"nvarchar(max)"
,
nullable
:
true
);
migrationBuilder
.
AddColumn
<
int
>(
name
:
"ProjectManagerId"
,
table
:
"Projects"
,
type
:
"int"
,
nullable
:
false
,
defaultValue
:
0
);
migrationBuilder
.
CreateIndex
(
name
:
"IX_Projects_ProjectManagerId"
,
table
:
"Projects"
,
column
:
"ProjectManagerId"
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Projects_Employees_ProjectManagerId"
,
table
:
"Projects"
,
column
:
"ProjectManagerId"
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Projects_Employees_TeamLeaderId"
,
table
:
"Projects"
,
column
:
"TeamLeaderId"
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Projects_Employees_ProjectManagerId"
,
table
:
"Projects"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Projects_Employees_TeamLeaderId"
,
table
:
"Projects"
);
migrationBuilder
.
DropIndex
(
name
:
"IX_Projects_ProjectManagerId"
,
table
:
"Projects"
);
migrationBuilder
.
DropColumn
(
name
:
"FinicialSource"
,
table
:
"Projects"
);
migrationBuilder
.
DropColumn
(
name
:
"FinicialStatus"
,
table
:
"Projects"
);
migrationBuilder
.
DropColumn
(
name
:
"ProjectManagerId"
,
table
:
"Projects"
);
migrationBuilder
.
AlterColumn
<
int
>(
name
:
"TeamLeaderId"
,
table
:
"Projects"
,
type
:
"int"
,
nullable
:
true
,
oldClrType
:
typeof
(
int
),
oldType
:
"int"
);
migrationBuilder
.
AddColumn
<
int
>(
name
:
"ProjectTypeId"
,
table
:
"Projects"
,
type
:
"int"
,
nullable
:
true
);
migrationBuilder
.
CreateTable
(
name
:
"ProjectType"
,
columns
:
table
=>
new
{
Id
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
false
)
.
Annotation
(
"SqlServer:Identity"
,
"1, 1"
),
Description
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
TypeName
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
WorkerCount
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
false
)
},
constraints
:
table
=>
{
table
.
PrimaryKey
(
"PK_ProjectType"
,
x
=>
x
.
Id
);
});
migrationBuilder
.
CreateIndex
(
name
:
"IX_Projects_ProjectTypeId"
,
table
:
"Projects"
,
column
:
"ProjectTypeId"
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Projects_Employees_TeamLeaderId"
,
table
:
"Projects"
,
column
:
"TeamLeaderId"
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Restrict
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Projects_ProjectType_ProjectTypeId"
,
table
:
"Projects"
,
column
:
"ProjectTypeId"
,
principalTable
:
"ProjectType"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Restrict
);
}
}
}
PSManagement.Infrastructure.Persistence/Migrations/20240806132941_AddDomainUpdate3.Designer.cs
0 → 100644
View file @
4ac73670
// <auto-generated />
using
System
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Infrastructure
;
using
Microsoft.EntityFrameworkCore.Metadata
;
using
Microsoft.EntityFrameworkCore.Migrations
;
using
Microsoft.EntityFrameworkCore.Storage.ValueConversion
;
using
PSManagement.Infrastructure.Persistence
;
namespace
PSManagement.Infrastructure.Persistence.Migrations
{
[
DbContext
(
typeof
(
AppDbContext
))]
[
Migration
(
"20240806132941_AddDomainUpdate3"
)]
partial
class
AddDomainUpdate3
{
protected
override
void
BuildTargetModel
(
ModelBuilder
modelBuilder
)
{
#pragma warning disable 612, 618
modelBuilder
.
HasAnnotation
(
"Relational:Collation"
,
"Arabic_CI_AS"
)
.
HasAnnotation
(
"Relational:MaxIdentifierLength"
,
128
)
.
HasAnnotation
(
"ProductVersion"
,
"5.0.17"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"CustomerName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Email"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Customers"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Department"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Departments"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"HIASTId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"UserId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"TrackId"
);
b
.
HasIndex
(
"UserId"
)
.
IsUnique
();
b
.
ToTable
(
"Employees"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.Permission"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Permission"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.Role"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Roles"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.User"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Email"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"HashedPassword"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"UserName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Users"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
?>(
"ExecuterId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectManagerId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProjectStatusId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProposerId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"TeamLeaderId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ExecuterId"
);
b
.
HasIndex
(
"ProjectManagerId"
);
b
.
HasIndex
(
"ProjectStatusId"
);
b
.
HasIndex
(
"ProposerId"
);
b
.
HasIndex
(
"TeamLeaderId"
);
b
.
ToTable
(
"Projects"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.Attachment"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"AttachmenDescription"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"AttachmentName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"AttachmentUrl"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Attachment"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.EmployeeParticipate"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"EmployeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"PartialTimeRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Role"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmployeeId"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"EmployeeParticipate"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.ProjectStatus"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Code"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Details"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"ProjectStatus"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Item"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"ItemDescription"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"ItemName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Items"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"CurrentCompletionRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"Duration"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
DateTime
>(
"StartDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
string
>(
"StepName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"Weight"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Steps"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.EmployeeTrack"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"AssignedWork"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"EmloyeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"PerformedWork"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"WorkingHours"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmloyeeId"
);
b
.
HasIndex
(
"TrackId"
);
b
.
ToTable
(
"EmployeeTrack"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.EmployeeWork"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ContributingRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"EmployeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"EmployeeWorkId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"HoursWorked"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Notes"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"StepTrackId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmployeeId"
);
b
.
HasIndex
(
"StepTrackId"
);
b
.
ToTable
(
"EmployeeWorks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ExecutionRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"StepId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"StepId"
);
b
.
HasIndex
(
"TrackId"
);
b
.
ToTable
(
"StepTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
DateTime
>(
"TrackDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
string
>(
"TrackNote"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Tracks"
);
});
modelBuilder
.
Entity
(
"PermissionRole"
,
b
=>
{
b
.
Property
<
int
>(
"PermissionsId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"RolesId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"PermissionsId"
,
"RolesId"
);
b
.
HasIndex
(
"RolesId"
);
b
.
ToTable
(
"PermissionRole"
);
});
modelBuilder
.
Entity
(
"RoleUser"
,
b
=>
{
b
.
Property
<
int
>(
"RolesId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"UsersId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"RolesId"
,
"UsersId"
);
b
.
HasIndex
(
"UsersId"
);
b
.
ToTable
(
"RoleUser"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
OwnsMany
(
"PSManagement.Domain.Customers.Entities.ContactInfo"
,
"ContactInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"CustomerId"
)
.
HasColumnType
(
"int"
);
b1
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"ContactType"
)
.
HasColumnType
(
"nvarchar(max)"
);
b1
.
Property
<
string
>(
"ContactValue"
)
.
HasColumnType
(
"nvarchar(max)"
);
b1
.
HasKey
(
"CustomerId"
,
"Id"
);
b1
.
ToTable
(
"ContactInfo"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"CustomerId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Customers.ValueObjects.Address"
,
"Address"
,
b1
=>
{
b1
.
Property
<
int
>(
"CustomerId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"City"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"City"
);
b1
.
Property
<
string
>(
"StreetName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"StreetName"
);
b1
.
Property
<
int
>(
"StreetNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"StreetNumber"
);
b1
.
Property
<
int
>(
"ZipCode"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"ZipCode"
);
b1
.
HasKey
(
"CustomerId"
);
b1
.
ToTable
(
"Customers"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"CustomerId"
);
});
b
.
Navigation
(
"Address"
);
b
.
Navigation
(
"ContactInfo"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
null
)
.
WithMany
(
"TrackedEmployees"
)
.
HasForeignKey
(
"TrackId"
);
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.User"
,
"User"
)
.
WithOne
(
"Employee"
)
.
HasForeignKey
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"UserId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
OwnsOne
(
"PSManagement.Domain.Employees.Entities.Availability"
,
"Availability"
,
b1
=>
{
b1
.
Property
<
int
>(
"EmployeeId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
int
>(
"CurrentWorkingHours"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"CurrentWorkingHours"
);
b1
.
Property
<
bool
>(
"IsAvailable"
)
.
HasColumnType
(
"bit"
)
.
HasColumnName
(
"IsAvailable"
);
b1
.
HasKey
(
"EmployeeId"
);
b1
.
ToTable
(
"Employees"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"EmployeeId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Employees.Entities.PersonalInfo"
,
"PersonalInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"EmployeeId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"FirstName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FirstName"
);
b1
.
Property
<
string
>(
"LastName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"LastName"
);
b1
.
HasKey
(
"EmployeeId"
);
b1
.
ToTable
(
"Employees"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"EmployeeId"
);
});
b
.
Navigation
(
"Availability"
);
b
.
Navigation
(
"PersonalInfo"
);
b
.
Navigation
(
"User"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Department"
,
"Executer"
)
.
WithMany
()
.
HasForeignKey
(
"ExecuterId"
);
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"ProjectManager"
)
.
WithMany
()
.
HasForeignKey
(
"ProjectManagerId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Projects.Entities.ProjectStatus"
,
"ProjectStatus"
)
.
WithMany
()
.
HasForeignKey
(
"ProjectStatusId"
);
b
.
HasOne
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
"Proposer"
)
.
WithMany
(
"Projects"
)
.
HasForeignKey
(
"ProposerId"
);
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"TeamLeader"
)
.
WithMany
()
.
HasForeignKey
(
"TeamLeaderId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.Aggreement"
,
"ProjectAggreement"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
DateTime
>(
"AggreementDate"
)
.
HasColumnType
(
"datetime2"
)
.
HasColumnName
(
"AggreementDate"
);
b1
.
Property
<
int
>(
"AggreementNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"AggreementNumber"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.FinincialFund"
,
"FinincialFund"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"FinicialStatus"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FinicialStatus"
);
b1
.
Property
<
string
>(
"Source"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FinicialSource"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.ProjectInfo"
,
"ProjectInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"Code"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Code"
);
b1
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Description"
);
b1
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Name"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.ProposalInfo"
,
"ProposalInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
DateTime
>(
"ProposingBookDate"
)
.
HasColumnType
(
"datetime2"
)
.
HasColumnName
(
"ProposingBookDate"
);
b1
.
Property
<
int
>(
"ProposingBookNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"ProposingBookNumber"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
Navigation
(
"Executer"
);
b
.
Navigation
(
"FinincialFund"
);
b
.
Navigation
(
"ProjectAggreement"
);
b
.
Navigation
(
"ProjectInfo"
);
b
.
Navigation
(
"ProjectManager"
);
b
.
Navigation
(
"ProjectStatus"
);
b
.
Navigation
(
"ProposalInfo"
);
b
.
Navigation
(
"Proposer"
);
b
.
Navigation
(
"TeamLeader"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.Attachment"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
null
)
.
WithMany
(
"Attachments"
)
.
HasForeignKey
(
"ProjectId"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.EmployeeParticipate"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeParticipates"
)
.
HasForeignKey
(
"EmployeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"EmployeeParticipates"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Item"
,
b
=>
{
b
.
OwnsOne
(
"PSManagement.SharedKernel.ValueObjects.Money"
,
"Price"
,
b1
=>
{
b1
.
Property
<
int
>(
"ItemId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
int
>(
"Ammount"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"Ammount"
);
b1
.
Property
<
string
>(
"Currency"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Currency"
);
b1
.
HasKey
(
"ItemId"
);
b1
.
ToTable
(
"Items"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ItemId"
);
});
b
.
Navigation
(
"Price"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"Steps"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.EmployeeTrack"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeTracks"
)
.
HasForeignKey
(
"EmloyeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
"Track"
)
.
WithMany
(
"EmployeeTracks"
)
.
HasForeignKey
(
"TrackId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"Track"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.EmployeeWork"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
()
.
HasForeignKey
(
"EmployeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
"StepTrack"
)
.
WithMany
()
.
HasForeignKey
(
"StepTrackId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"StepTrack"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Steps.Entities.Step"
,
"Step"
)
.
WithMany
(
"StepTracks"
)
.
HasForeignKey
(
"StepId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
"Track"
)
.
WithMany
(
"StepTracks"
)
.
HasForeignKey
(
"TrackId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
Navigation
(
"Step"
);
b
.
Navigation
(
"Track"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"Tracks"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PermissionRole"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Permission"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"PermissionsId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Role"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"RolesId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
});
modelBuilder
.
Entity
(
"RoleUser"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Role"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"RolesId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.User"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"UsersId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
Navigation
(
"Projects"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
Navigation
(
"EmployeeParticipates"
);
b
.
Navigation
(
"EmployeeTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.User"
,
b
=>
{
b
.
Navigation
(
"Employee"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
Navigation
(
"Attachments"
);
b
.
Navigation
(
"EmployeeParticipates"
);
b
.
Navigation
(
"Steps"
);
b
.
Navigation
(
"Tracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
Navigation
(
"StepTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
Navigation
(
"EmployeeTracks"
);
b
.
Navigation
(
"StepTracks"
);
b
.
Navigation
(
"TrackedEmployees"
);
});
#pragma warning restore 612, 618
}
}
}
PSManagement.Infrastructure.Persistence/Migrations/20240806132941_AddDomainUpdate3.cs
0 → 100644
View file @
4ac73670
using
Microsoft.EntityFrameworkCore.Migrations
;
namespace
PSManagement.Infrastructure.Persistence.Migrations
{
public
partial
class
AddDomainUpdate3
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Projects_Employees_ProjectManagerId"
,
table
:
"Projects"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Projects_Employees_TeamLeaderId"
,
table
:
"Projects"
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Projects_Employees_ProjectManagerId"
,
table
:
"Projects"
,
column
:
"ProjectManagerId"
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Restrict
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Projects_Employees_TeamLeaderId"
,
table
:
"Projects"
,
column
:
"TeamLeaderId"
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Restrict
);
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Projects_Employees_ProjectManagerId"
,
table
:
"Projects"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_Projects_Employees_TeamLeaderId"
,
table
:
"Projects"
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Projects_Employees_ProjectManagerId"
,
table
:
"Projects"
,
column
:
"ProjectManagerId"
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_Projects_Employees_TeamLeaderId"
,
table
:
"Projects"
,
column
:
"TeamLeaderId"
,
principalTable
:
"Employees"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
}
}
}
PSManagement.Infrastructure.Persistence/Migrations/20240806133359_AddDomainUpdate4.Designer.cs
0 → 100644
View file @
4ac73670
// <auto-generated />
using
System
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Infrastructure
;
using
Microsoft.EntityFrameworkCore.Metadata
;
using
Microsoft.EntityFrameworkCore.Migrations
;
using
Microsoft.EntityFrameworkCore.Storage.ValueConversion
;
using
PSManagement.Infrastructure.Persistence
;
namespace
PSManagement.Infrastructure.Persistence.Migrations
{
[
DbContext
(
typeof
(
AppDbContext
))]
[
Migration
(
"20240806133359_AddDomainUpdate4"
)]
partial
class
AddDomainUpdate4
{
protected
override
void
BuildTargetModel
(
ModelBuilder
modelBuilder
)
{
#pragma warning disable 612, 618
modelBuilder
.
HasAnnotation
(
"Relational:Collation"
,
"Arabic_CI_AS"
)
.
HasAnnotation
(
"Relational:MaxIdentifierLength"
,
128
)
.
HasAnnotation
(
"ProductVersion"
,
"5.0.17"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"CustomerName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Email"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Customers"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Department"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Departments"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"HIASTId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"UserId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"TrackId"
);
b
.
HasIndex
(
"UserId"
)
.
IsUnique
();
b
.
ToTable
(
"Employees"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.Permission"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Permission"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.Role"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Roles"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.User"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Email"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"HashedPassword"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"UserName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Users"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
?>(
"ExecuterId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectManagerId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProjectStatusId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProposerId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"TeamLeaderId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ExecuterId"
);
b
.
HasIndex
(
"ProjectManagerId"
);
b
.
HasIndex
(
"ProjectStatusId"
);
b
.
HasIndex
(
"ProposerId"
);
b
.
HasIndex
(
"TeamLeaderId"
);
b
.
ToTable
(
"Projects"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.Attachment"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"AttachmenDescription"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"AttachmentName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"AttachmentUrl"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Attachment"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.EmployeeParticipate"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"EmployeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"PartialTimeRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Role"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmployeeId"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"EmployeeParticipate"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.ProjectStatus"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Code"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Details"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"ProjectStatus"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Item"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"ItemDescription"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"ItemName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Items"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"CurrentCompletionRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"Duration"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
DateTime
>(
"StartDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
string
>(
"StepName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"Weight"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Steps"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.EmployeeTrack"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"AssignedWork"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"EmloyeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"PerformedWork"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"WorkingHours"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmloyeeId"
);
b
.
HasIndex
(
"TrackId"
);
b
.
ToTable
(
"EmployeeTrack"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.EmployeeWork"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ContributingRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"EmployeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"EmployeeWorkId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"HoursWorked"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Notes"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"StepTrackId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmployeeId"
);
b
.
HasIndex
(
"StepTrackId"
);
b
.
ToTable
(
"EmployeeWorks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ExecutionRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"StepId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"StepId"
);
b
.
HasIndex
(
"TrackId"
);
b
.
ToTable
(
"StepTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
DateTime
>(
"TrackDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
string
>(
"TrackNote"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"Tracks"
);
});
modelBuilder
.
Entity
(
"PermissionRole"
,
b
=>
{
b
.
Property
<
int
>(
"PermissionsId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"RolesId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"PermissionsId"
,
"RolesId"
);
b
.
HasIndex
(
"RolesId"
);
b
.
ToTable
(
"PermissionRole"
);
});
modelBuilder
.
Entity
(
"RoleUser"
,
b
=>
{
b
.
Property
<
int
>(
"RolesId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"UsersId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"RolesId"
,
"UsersId"
);
b
.
HasIndex
(
"UsersId"
);
b
.
ToTable
(
"RoleUser"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
OwnsMany
(
"PSManagement.Domain.Customers.Entities.ContactInfo"
,
"ContactInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"CustomerId"
)
.
HasColumnType
(
"int"
);
b1
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"ContactType"
)
.
HasColumnType
(
"nvarchar(max)"
);
b1
.
Property
<
string
>(
"ContactValue"
)
.
HasColumnType
(
"nvarchar(max)"
);
b1
.
HasKey
(
"CustomerId"
,
"Id"
);
b1
.
ToTable
(
"ContactInfo"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"CustomerId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Customers.ValueObjects.Address"
,
"Address"
,
b1
=>
{
b1
.
Property
<
int
>(
"CustomerId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"City"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"City"
);
b1
.
Property
<
string
>(
"StreetName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"StreetName"
);
b1
.
Property
<
int
>(
"StreetNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"StreetNumber"
);
b1
.
Property
<
int
>(
"ZipCode"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"ZipCode"
);
b1
.
HasKey
(
"CustomerId"
);
b1
.
ToTable
(
"Customers"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"CustomerId"
);
});
b
.
Navigation
(
"Address"
);
b
.
Navigation
(
"ContactInfo"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
null
)
.
WithMany
(
"TrackedEmployees"
)
.
HasForeignKey
(
"TrackId"
);
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.User"
,
"User"
)
.
WithOne
(
"Employee"
)
.
HasForeignKey
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"UserId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
OwnsOne
(
"PSManagement.Domain.Employees.Entities.Availability"
,
"Availability"
,
b1
=>
{
b1
.
Property
<
int
>(
"EmployeeId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
int
>(
"CurrentWorkingHours"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"CurrentWorkingHours"
);
b1
.
Property
<
bool
>(
"IsAvailable"
)
.
HasColumnType
(
"bit"
)
.
HasColumnName
(
"IsAvailable"
);
b1
.
HasKey
(
"EmployeeId"
);
b1
.
ToTable
(
"Employees"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"EmployeeId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Employees.Entities.PersonalInfo"
,
"PersonalInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"EmployeeId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"FirstName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FirstName"
);
b1
.
Property
<
string
>(
"LastName"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"LastName"
);
b1
.
HasKey
(
"EmployeeId"
);
b1
.
ToTable
(
"Employees"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"EmployeeId"
);
});
b
.
Navigation
(
"Availability"
);
b
.
Navigation
(
"PersonalInfo"
);
b
.
Navigation
(
"User"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Department"
,
"Executer"
)
.
WithMany
()
.
HasForeignKey
(
"ExecuterId"
);
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"ProjectManager"
)
.
WithMany
()
.
HasForeignKey
(
"ProjectManagerId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
);
b
.
HasOne
(
"PSManagement.Domain.Projects.Entities.ProjectStatus"
,
"ProjectStatus"
)
.
WithMany
()
.
HasForeignKey
(
"ProjectStatusId"
);
b
.
HasOne
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
"Proposer"
)
.
WithMany
(
"Projects"
)
.
HasForeignKey
(
"ProposerId"
);
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"TeamLeader"
)
.
WithMany
()
.
HasForeignKey
(
"TeamLeaderId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
);
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.Aggreement"
,
"ProjectAggreement"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
DateTime
>(
"AggreementDate"
)
.
HasColumnType
(
"datetime2"
)
.
HasColumnName
(
"AggreementDate"
);
b1
.
Property
<
int
>(
"AggreementNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"AggreementNumber"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.FinincialFund"
,
"FinincialFund"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"FinicialStatus"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FinicialStatus"
);
b1
.
Property
<
string
>(
"Source"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FinicialSource"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.ProjectInfo"
,
"ProjectInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"Code"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Code"
);
b1
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Description"
);
b1
.
Property
<
string
>(
"Name"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Name"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.ProposalInfo"
,
"ProposalInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
DateTime
>(
"ProposingBookDate"
)
.
HasColumnType
(
"datetime2"
)
.
HasColumnName
(
"ProposingBookDate"
);
b1
.
Property
<
int
>(
"ProposingBookNumber"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"ProposingBookNumber"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
Navigation
(
"Executer"
);
b
.
Navigation
(
"FinincialFund"
);
b
.
Navigation
(
"ProjectAggreement"
);
b
.
Navigation
(
"ProjectInfo"
);
b
.
Navigation
(
"ProjectManager"
);
b
.
Navigation
(
"ProjectStatus"
);
b
.
Navigation
(
"ProposalInfo"
);
b
.
Navigation
(
"Proposer"
);
b
.
Navigation
(
"TeamLeader"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.Attachment"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
null
)
.
WithMany
(
"Attachments"
)
.
HasForeignKey
(
"ProjectId"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.EmployeeParticipate"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeParticipates"
)
.
HasForeignKey
(
"EmployeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"EmployeeParticipates"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Item"
,
b
=>
{
b
.
OwnsOne
(
"PSManagement.SharedKernel.ValueObjects.Money"
,
"Price"
,
b1
=>
{
b1
.
Property
<
int
>(
"ItemId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
int
>(
"Ammount"
)
.
HasColumnType
(
"int"
)
.
HasColumnName
(
"Ammount"
);
b1
.
Property
<
string
>(
"Currency"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"Currency"
);
b1
.
HasKey
(
"ItemId"
);
b1
.
ToTable
(
"Items"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ItemId"
);
});
b
.
Navigation
(
"Price"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"Steps"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.EmployeeTrack"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeTracks"
)
.
HasForeignKey
(
"EmloyeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
"Track"
)
.
WithMany
(
"EmployeeTracks"
)
.
HasForeignKey
(
"TrackId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"Track"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.EmployeeWork"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
()
.
HasForeignKey
(
"EmployeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
"StepTrack"
)
.
WithMany
()
.
HasForeignKey
(
"StepTrackId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"StepTrack"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Steps.Entities.Step"
,
"Step"
)
.
WithMany
(
"StepTracks"
)
.
HasForeignKey
(
"StepId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
"Track"
)
.
WithMany
(
"StepTracks"
)
.
HasForeignKey
(
"TrackId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
Navigation
(
"Step"
);
b
.
Navigation
(
"Track"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"Tracks"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
IsRequired
();
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PermissionRole"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Permission"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"PermissionsId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Role"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"RolesId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
});
modelBuilder
.
Entity
(
"RoleUser"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.Role"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"RolesId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.User"
,
null
)
.
WithMany
()
.
HasForeignKey
(
"UsersId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
b
=>
{
b
.
Navigation
(
"Projects"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
Navigation
(
"EmployeeParticipates"
);
b
.
Navigation
(
"EmployeeTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.User"
,
b
=>
{
b
.
Navigation
(
"Employee"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
Navigation
(
"Attachments"
);
b
.
Navigation
(
"EmployeeParticipates"
);
b
.
Navigation
(
"Steps"
);
b
.
Navigation
(
"Tracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
Navigation
(
"StepTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
Navigation
(
"EmployeeTracks"
);
b
.
Navigation
(
"StepTracks"
);
b
.
Navigation
(
"TrackedEmployees"
);
});
#pragma warning restore 612, 618
}
}
}
PSManagement.Infrastructure.Persistence/Migrations/20240806133359_AddDomainUpdate4.cs
0 → 100644
View file @
4ac73670
using
Microsoft.EntityFrameworkCore.Migrations
;
namespace
PSManagement.Infrastructure.Persistence.Migrations
{
public
partial
class
AddDomainUpdate4
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
}
}
}
PSManagement.Infrastructure.Persistence/Migrations/AppDbContextModelSnapshot.cs
View file @
4ac73670
...
...
@@ -63,7 +63,7 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
Property
<
int
>(
"HIASTId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"
Step
Id"
)
b
.
Property
<
int
?>(
"
Track
Id"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"UserId"
)
...
...
@@ -71,7 +71,7 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"
Step
Id"
);
b
.
HasIndex
(
"
Track
Id"
);
b
.
HasIndex
(
"UserId"
)
.
IsUnique
();
...
...
@@ -130,27 +130,6 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
ToTable
(
"Users"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.ProjectTypes.Entities.ProjectType"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
string
>(
"TypeName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"WorkerCount"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"ProjectType"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
...
...
@@ -161,25 +140,25 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
Property
<
int
?>(
"ExecuterId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProjectStatus
Id"
)
b
.
Property
<
int
>(
"ProjectManager
Id"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"Project
Type
Id"
)
b
.
Property
<
int
?>(
"Project
Status
Id"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?>(
"ProposerId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
?
>(
"TeamLeaderId"
)
b
.
Property
<
int
>(
"TeamLeaderId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ExecuterId"
);
b
.
HasIndex
(
"Project
Status
Id"
);
b
.
HasIndex
(
"Project
Manager
Id"
);
b
.
HasIndex
(
"Project
Type
Id"
);
b
.
HasIndex
(
"Project
Status
Id"
);
b
.
HasIndex
(
"ProposerId"
);
...
...
@@ -214,6 +193,34 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
ToTable
(
"Attachment"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.EmployeeParticipate"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"EmployeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"PartialTimeRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"ProjectId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Role"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmployeeId"
);
b
.
HasIndex
(
"ProjectId"
);
b
.
ToTable
(
"EmployeeParticipate"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Entities.ProjectStatus"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
...
...
@@ -248,13 +255,8 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
Property
<
string
>(
"ItemName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?>(
"StepId"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"StepId"
);
b
.
ToTable
(
"Items"
);
});
...
...
@@ -265,6 +267,9 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"CurrentCompletionRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"Description"
)
.
HasColumnType
(
"nvarchar(max)"
);
...
...
@@ -280,6 +285,9 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
Property
<
string
>(
"StepName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"Weight"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"ProjectId"
);
...
...
@@ -287,6 +295,37 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
ToTable
(
"Steps"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.EmployeeTrack"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
string
>(
"AssignedWork"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"EmloyeeId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"PerformedWork"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"TrackId"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"WorkingHours"
)
.
HasColumnType
(
"int"
);
b
.
HasKey
(
"Id"
);
b
.
HasIndex
(
"EmloyeeId"
);
b
.
HasIndex
(
"TrackId"
);
b
.
ToTable
(
"EmployeeTrack"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.EmployeeWork"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
...
...
@@ -328,6 +367,9 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b
.
Property
<
int
>(
"ExecutionRatio"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
int
>(
"StepId"
)
.
HasColumnType
(
"int"
);
...
...
@@ -460,9 +502,9 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.
Steps.Entities.Step
"
,
null
)
.
WithMany
(
"
Participant
s"
)
.
HasForeignKey
(
"
Step
Id"
);
b
.
HasOne
(
"PSManagement.Domain.
Tracking.Track
"
,
null
)
.
WithMany
(
"
TrackedEmployee
s"
)
.
HasForeignKey
(
"
Track
Id"
);
b
.
HasOne
(
"PSManagement.Domain.Identity.Entities.User"
,
"User"
)
.
WithOne
(
"Employee"
)
...
...
@@ -529,21 +571,23 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
.
WithMany
()
.
HasForeignKey
(
"ExecuterId"
);
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"ProjectManager"
)
.
WithMany
()
.
HasForeignKey
(
"ProjectManagerId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
);
b
.
HasOne
(
"PSManagement.Domain.Projects.Entities.ProjectStatus"
,
"ProjectStatus"
)
.
WithMany
()
.
HasForeignKey
(
"ProjectStatusId"
);
b
.
HasOne
(
"PSManagement.Domain.ProjectTypes.Entities.ProjectType"
,
"ProjectType"
)
.
WithMany
(
"Projects"
)
.
HasForeignKey
(
"ProjectTypeId"
);
b
.
HasOne
(
"PSManagement.Domain.Customers.Aggregate.Customer"
,
"Proposer"
)
.
WithMany
(
"Projects"
)
.
HasForeignKey
(
"ProposerId"
);
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"TeamLeader"
)
.
WithMany
()
.
HasForeignKey
(
"TeamLeaderId"
);
.
HasForeignKey
(
"TeamLeaderId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
);
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.Aggreement"
,
"ProjectAggreement"
,
b1
=>
{
...
...
@@ -568,6 +612,29 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.FinincialFund"
,
"FinincialFund"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"int"
)
.
HasAnnotation
(
"SqlServer:ValueGenerationStrategy"
,
SqlServerValueGenerationStrategy
.
IdentityColumn
);
b1
.
Property
<
string
>(
"FinicialStatus"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FinicialStatus"
);
b1
.
Property
<
string
>(
"Source"
)
.
HasColumnType
(
"nvarchar(max)"
)
.
HasColumnName
(
"FinicialSource"
);
b1
.
HasKey
(
"ProjectId"
);
b1
.
ToTable
(
"Projects"
);
b1
.
WithOwner
()
.
HasForeignKey
(
"ProjectId"
);
});
b
.
OwnsOne
(
"PSManagement.Domain.Projects.Aggregate.ProjectInfo"
,
"ProjectInfo"
,
b1
=>
{
b1
.
Property
<
int
>(
"ProjectId"
)
...
...
@@ -620,13 +687,15 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
Navigation
(
"Executer"
);
b
.
Navigation
(
"FinincialFund"
);
b
.
Navigation
(
"ProjectAggreement"
);
b
.
Navigation
(
"ProjectInfo"
);
b
.
Navigation
(
"Project
Status
"
);
b
.
Navigation
(
"Project
Manager
"
);
b
.
Navigation
(
"Project
Type
"
);
b
.
Navigation
(
"Project
Status
"
);
b
.
Navigation
(
"ProposalInfo"
);
...
...
@@ -642,12 +711,27 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
.
HasForeignKey
(
"ProjectId"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.
Steps.Entities.Item
"
,
b
=>
modelBuilder
.
Entity
(
"PSManagement.Domain.
Projects.Entities.EmployeeParticipate
"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Steps.Entities.Step"
,
null
)
.
WithMany
(
"Purchases"
)
.
HasForeignKey
(
"StepId"
);
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeParticipates"
)
.
HasForeignKey
(
"EmployeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
"Project"
)
.
WithMany
(
"EmployeeParticipates"
)
.
HasForeignKey
(
"ProjectId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Item"
,
b
=>
{
b
.
OwnsOne
(
"PSManagement.SharedKernel.ValueObjects.Money"
,
"Price"
,
b1
=>
{
b1
.
Property
<
int
>(
"ItemId"
)
...
...
@@ -685,18 +769,37 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
Navigation
(
"Project"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.EmployeeTrack"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeTracks"
)
.
HasForeignKey
(
"EmloyeeId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Track"
,
"Track"
)
.
WithMany
(
"EmployeeTracks"
)
.
HasForeignKey
(
"TrackId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
b
.
Navigation
(
"Track"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.EmployeeWork"
,
b
=>
{
b
.
HasOne
(
"PSManagement.Domain.Employees.Entities.Employee"
,
"Employee"
)
.
WithMany
(
"EmployeeWorks"
)
.
WithMany
()
.
HasForeignKey
(
"EmployeeId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
HasOne
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
"StepTrack"
)
.
WithMany
(
"EmployeeWorks"
)
.
WithMany
()
.
HasForeignKey
(
"StepTrackId"
)
.
OnDelete
(
DeleteBehavior
.
Restrict
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
b
.
Navigation
(
"Employee"
);
...
...
@@ -771,7 +874,9 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
modelBuilder
.
Entity
(
"PSManagement.Domain.Employees.Entities.Employee"
,
b
=>
{
b
.
Navigation
(
"EmployeeWorks"
);
b
.
Navigation
(
"EmployeeParticipates"
);
b
.
Navigation
(
"EmployeeTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Identity.Entities.User"
,
b
=>
...
...
@@ -779,15 +884,12 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
b
.
Navigation
(
"Employee"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.ProjectTypes.Entities.ProjectType"
,
b
=>
{
b
.
Navigation
(
"Projects"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Projects.Aggregate.Project"
,
b
=>
{
b
.
Navigation
(
"Attachments"
);
b
.
Navigation
(
"EmployeeParticipates"
);
b
.
Navigation
(
"Steps"
);
b
.
Navigation
(
"Tracks"
);
...
...
@@ -795,21 +897,16 @@ namespace PSManagement.Infrastructure.Persistence.Migrations
modelBuilder
.
Entity
(
"PSManagement.Domain.Steps.Entities.Step"
,
b
=>
{
b
.
Navigation
(
"Participants"
);
b
.
Navigation
(
"Purchases"
);
b
.
Navigation
(
"StepTracks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Entities.StepTrack"
,
b
=>
{
b
.
Navigation
(
"EmployeeWorks"
);
});
modelBuilder
.
Entity
(
"PSManagement.Domain.Tracking.Track"
,
b
=>
{
b
.
Navigation
(
"EmployeeTracks"
);
b
.
Navigation
(
"StepTracks"
);
b
.
Navigation
(
"TrackedEmployees"
);
});
#pragma warning restore 612, 618
}
...
...
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