Commit a946c6cb authored by hasan khaddour's avatar hasan khaddour

Add Participation history

parent a0d3eb3f
...@@ -47,7 +47,7 @@ namespace PSManagement.Domain.Employees.Entities ...@@ -47,7 +47,7 @@ namespace PSManagement.Domain.Employees.Entities
} }
#endregion Constructors #endregion Constructors
#region business logic encapsulation
public void UpdateWorkHours(int workingHour) public void UpdateWorkHours(int workingHour)
{ {
...@@ -60,6 +60,7 @@ namespace PSManagement.Domain.Employees.Entities ...@@ -60,6 +60,7 @@ namespace PSManagement.Domain.Employees.Entities
AddDomainEvent(new EmployeeWorkHoursChangedEvent(Id,currentWorkHours,workingHour)); AddDomainEvent(new EmployeeWorkHoursChangedEvent(Id,currentWorkHours,workingHour));
}
#endregion business logic encapsulation
} }
} }
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Identity\ValueObjects\" />
<Folder Include="ProjectsTypes\Entites\" />
<Folder Include="ProjectsTypes\Specification\" />
<Folder Include="ProjectsTypes\Repositories\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PSManagement.SharedKernel\PSManagement.SharedKernel.csproj" />
</ItemGroup>
</Project>
...@@ -3,6 +3,7 @@ using PSManagement.Domain.FinancialSpends.Entities; ...@@ -3,6 +3,7 @@ using PSManagement.Domain.FinancialSpends.Entities;
using PSManagement.Domain.Projects.DomainEvents; using PSManagement.Domain.Projects.DomainEvents;
using PSManagement.Domain.Projects.Entities; using PSManagement.Domain.Projects.Entities;
using PSManagement.Domain.Projects.ValueObjects; using PSManagement.Domain.Projects.ValueObjects;
using PSManagement.Domain.ProjectsTypes.Entites;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
......
using PSManagement.Domain.Employees.Entities; using PSManagement.Domain.Employees.Entities;
using PSManagement.SharedKernel.Entities; using PSManagement.SharedKernel.Entities;
using System;
namespace PSManagement.Domain.Projects.Entities namespace PSManagement.Domain.Projects.Entities
{ {
......
using PSManagement.Domain.Employees.Entities;
using PSManagement.SharedKernel.Entities;
using System;
namespace PSManagement.Domain.Projects.Entities
{
public class ParticipationChange :BaseEntity{
public int EmployeeId { get; set; }
public int ProjectId { get; set; }
public int PartialTimeBefore { get; set; }
public int PartialTimeAfter { get; set; }
public string RoleBefore { get; set; }
public string RoleAfter { get; set; }
public DateTime ChangeDate { get; set; }
public Employee Employee { get; set; }
public Project Project { get; set; }
}
}
...@@ -4,6 +4,7 @@ using PSManagement.Domain.Employees.Entities; ...@@ -4,6 +4,7 @@ using PSManagement.Domain.Employees.Entities;
using PSManagement.Domain.FinancialSpends.Entities; using PSManagement.Domain.FinancialSpends.Entities;
using PSManagement.Domain.Projects.DomainEvents; using PSManagement.Domain.Projects.DomainEvents;
using PSManagement.Domain.Projects.ValueObjects; using PSManagement.Domain.Projects.ValueObjects;
using PSManagement.Domain.ProjectsTypes.Entites;
using PSManagement.Domain.Tracking; using PSManagement.Domain.Tracking;
using PSManagement.SharedKernel.Aggregate; using PSManagement.SharedKernel.Aggregate;
using System; using System;
......
...@@ -6,7 +6,9 @@ namespace PSManagement.Domain.Projects.ValueObjects ...@@ -6,7 +6,9 @@ namespace PSManagement.Domain.Projects.ValueObjects
string StepName, string StepName,
string Description, string Description,
DateTime StartDate, DateTime StartDate,
int Duration int Duration,
int NumberOfWorker
); );
} }
using Ardalis.Result; using PSManagement.SharedKernel.DomainErrors;
using PSManagement.SharedKernel.DomainErrors;
namespace PSManagement.Domain.Projects.DomainErrors namespace PSManagement.Domain.Projects.DomainErrors
{ {
public class PrjectTypesErrors public class ProjectTypesErrors
{ {
public static DomainError InvalidEntryError { get; } = new("ProjectErrors.InvalidEntry.", "Invalid Step Data"); public static DomainError InvalidEntryError { get; } = new("ProjectErrors.InvalidEntry.", "Invalid Step Data");
public static DomainError InvalidName { get; } = new("ProjectErrors.InvalidEntry.", "the name is already exist"); public static DomainError InvalidName { get; } = new("ProjectErrors.InvalidEntry.", "the name is already exist");
......
using PSManagement.SharedKernel.Entities; using PSManagement.Domain.Projects.Entities;
using PSManagement.SharedKernel.Entities;
using System.Collections.Generic; using System.Collections.Generic;
namespace PSManagement.Domain.Projects.Entities namespace PSManagement.Domain.ProjectsTypes.Entites
{ {
public class ProjectType : BaseEntity public class ProjectType : BaseEntity
{ {
public string TypeName { get; set; } public string TypeName { get; set; }
public string Description { get; set; } public string Description { get; set; }
public int ExpectedEffort { get; set; } public int ExpectedEffort { get; set; }
public int ExpectedNumberOfWorker { get; set; }
public ICollection<Project> Projects { get; set; } public ICollection<Project> Projects { get; set; }
} }
} }
using PSManagement.Domain.Projects.Entities; using PSManagement.Domain.ProjectsTypes.Entites;
using PSManagement.SharedKernel.Interfaces; using PSManagement.SharedKernel.Interfaces;
using PSManagement.SharedKernel.Repositories; using PSManagement.SharedKernel.Repositories;
using System.Collections.Generic; using System.Collections.Generic;
......
using PSManagement.Domain.Projects.Entities; using PSManagement.Domain.ProjectsTypes.Entites;
using PSManagement.SharedKernel.Specification; using PSManagement.SharedKernel.Specification;
using System; using System;
using System.Linq.Expressions; using System.Linq.Expressions;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment