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
Expand all
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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