Commit 0c387bd4 authored by hasan khaddour's avatar hasan khaddour

Update Domains

parent 4ac73670
using PSManagement.Domain.Customers.DomainEvents; using PSManagement.Domain.Customers.DomainEvents;
using PSManagement.Domain.Customers.Entities; using PSManagement.Domain.Customers.Entities;
using PSManagement.Domain.Customers.ValueObjects; using PSManagement.Domain.Customers.ValueObjects;
using PSManagement.Domain.Projects.Aggregate; using PSManagement.Domain.Projects.Entities;
using PSManagement.SharedKernel.Aggregate; using PSManagement.SharedKernel.Aggregate;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
......
using PSManagement.Domain.Identity.Entities; using PSManagement.Domain.Identity.Entities;
using PSManagement.Domain.Projects.Aggregate;
using PSManagement.Domain.Projects.Entities; using PSManagement.Domain.Projects.Entities;
using PSManagement.Domain.Tracking; using PSManagement.Domain.Tracking;
using PSManagement.Domain.Tracking.Entities; using PSManagement.Domain.Tracking.Entities;
...@@ -19,6 +18,8 @@ namespace PSManagement.Domain.Employees.Entities ...@@ -19,6 +18,8 @@ namespace PSManagement.Domain.Employees.Entities
public int UserId { get; set; } public int UserId { get; set; }
public User User { get; set; } public User User { get; set; }
public PersonalInfo PersonalInfo { get; set; } public PersonalInfo PersonalInfo { get; set; }
public WorkInfo WorkInfo { get; set; }
public ICollection<Project> Projects { get; set; } public ICollection<Project> Projects { get; set; }
public ICollection<EmployeeTrack> EmployeeTracks { get; set; } public ICollection<EmployeeTrack> EmployeeTracks { get; set; }
...@@ -36,5 +37,8 @@ namespace PSManagement.Domain.Employees.Entities ...@@ -36,5 +37,8 @@ namespace PSManagement.Domain.Employees.Entities
HIASTId = hiastId; HIASTId = hiastId;
} }
} }
public record WorkInfo (
String WorkType ,
String WorkJob
);
} }
using PSManagement.SharedKernel.Entities;
using PSManagement.SharedKernel.ValueObjects;
using System;
namespace PSManagement.Domain.Projects.Entities
{
public class FinincialSpending: BaseEntity
{
public String CostType { get; set; }
public String Description { get; set; }
public Money LocalPurchase { get; set; }
public Money ExternalPurchase { get; set; }
}
}
namespace PSManagement.Domain.FinincialSpending.Repositories
{
public interface IFinicialSpendingRepository
{
}
}
using System; using PSManagement.SharedKernel.Entities;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace PSManagement.Domain.Identity.Entities namespace PSManagement.Domain.Identity.Entities
{ {
public class Role { public class Role :BaseEntity {
[Key]
public int Id { get; set; }
public String Name { get; set; } public String Name { get; set; }
public ICollection<Permission> Permissions { get; set; } public ICollection<Permission> Permissions { get; set; }
public ICollection<User> Users { get; set; } public ICollection<User> Users { get; set; }
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
<ItemGroup> <ItemGroup>
<Folder Include="Identity\ValueObjects\" /> <Folder Include="Identity\ValueObjects\" />
<Folder Include="Projects\DomainErrors\" /> <Folder Include="Projects\DomainErrors\" />
<Folder Include="Reports\Entities\" />
<Folder Include="Reports\Repositories\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
using PSManagement.Domain.Employees.Entities; using PSManagement.Domain.Employees.Entities;
using PSManagement.Domain.Projects.Aggregate;
using PSManagement.SharedKernel.Entities; using PSManagement.SharedKernel.Entities;
using System; using System;
......
using PSManagement.Domain.Customers.Aggregate; using PSManagement.Domain.Customers.Aggregate;
using PSManagement.Domain.Employees.Entities; using PSManagement.Domain.Employees.Entities;
using PSManagement.Domain.Projects.Entities; using PSManagement.Domain.Projects.ValueObjects;
using PSManagement.Domain.ProjectsStatus.Entites;
using PSManagement.Domain.ProjectTypes.Entities; using PSManagement.Domain.ProjectTypes.Entities;
using PSManagement.Domain.Steps.Entities;
using PSManagement.Domain.Tracking; using PSManagement.Domain.Tracking;
using PSManagement.SharedKernel.Aggregate; using PSManagement.SharedKernel.Aggregate;
using PSManagement.SharedKernel.ValueObjects;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace PSManagement.Domain.Projects.Aggregate namespace PSManagement.Domain.Projects.Entities
{ {
public class Project : IAggregateRoot public class Project : IAggregateRoot
{ {
// information about the project itself // information about the project itself
public ProposalInfo ProposalInfo { get; set; } public ProposalInfo ProposalInfo { get; set; }
public ProjectInfo ProjectInfo { get; set; } public ProjectInfo ProjectInfo { get; set; }
//public ProjectType ProjectType { get; set; }
public ProjectStatus ProjectStatus { get; set; } public ProjectStatus ProjectStatus { get; set; }
public Aggreement ProjectAggreement { get; set; } public Aggreement ProjectAggreement { get; set; }
...@@ -27,10 +26,11 @@ namespace PSManagement.Domain.Projects.Aggregate ...@@ -27,10 +26,11 @@ namespace PSManagement.Domain.Projects.Aggregate
public Employee TeamLeader { get; set; } public Employee TeamLeader { get; set; }
public int ProjectManagerId { get; set; } public int ProjectManagerId { get; set; }
public Employee ProjectManager { get; set; } public Employee ProjectManager { get; set; }
public int ExecuterId { get; set; }
public Department Executer { get; set; } public Department Executer { get; set; }
// the proposer of the project // the proposer of the project
public int ProposerId { get; private set; }
public Customer Proposer { get; set; } public Customer Proposer { get; set; }
// //
...@@ -40,18 +40,33 @@ namespace PSManagement.Domain.Projects.Aggregate ...@@ -40,18 +40,33 @@ namespace PSManagement.Domain.Projects.Aggregate
// finincial plan // finincial plan
public FinincialFund FinincialFund { get; set; } public FinincialFund FinincialFund { get; set; }
public ICollection<FinincialSpending> FinincialSpending { get; set; }
public ICollection<EmployeeParticipate> EmployeeParticipates { get; set; } public ICollection<EmployeeParticipate> EmployeeParticipates { get; set; }
public ICollection<Track> Tracks { get; set; } public ICollection<Track> Tracks { get; set; }
public Project(
ProposalInfo proposalInfo,
ProjectInfo projectInfo,
Aggreement projectAggreement,
int proposerId,
int teamLeaderId,
int projectManagerId,
int executerId)
{
ProposalInfo = proposalInfo;
ProjectInfo = projectInfo;
ProjectAggreement = projectAggreement;
TeamLeaderId = teamLeaderId;
ProjectManagerId = projectManagerId;
ExecuterId = executerId;
ProposerId = proposerId;
}
public Project() public Project()
{ {
} }
} }
public record FinincialFund (
string FinicialStatus,
string Source
);
} }
using PSManagement.Domain.Employees.Entities; using PSManagement.Domain.Employees.Entities;
using PSManagement.Domain.Projects.Aggregate;
using PSManagement.Domain.Tracking; using PSManagement.Domain.Tracking;
using PSManagement.Domain.Tracking.Entities; using PSManagement.Domain.Tracking.Entities;
using PSManagement.SharedKernel.Aggregate; using PSManagement.SharedKernel.Aggregate;
...@@ -10,7 +9,7 @@ using System.Linq; ...@@ -10,7 +9,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace PSManagement.Domain.Steps.Entities namespace PSManagement.Domain.Projects.Entities
{ {
public class Step : BaseEntity public class Step : BaseEntity
{ {
......
using PSManagement.Domain.Steps.Entities; using PSManagement.Domain.Projects.Entities;
using PSManagement.SharedKernel.Repositories; using PSManagement.SharedKernel.Repositories;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -6,7 +6,7 @@ using System.Linq; ...@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace PSManagement.Domain.Steps.Repositories namespace PSManagement.Domain.Projects.Repositories
{ {
public interface IStepsRepository : IRepository<Step> public interface IStepsRepository : IRepository<Step>
{ {
......
using System; using System;
namespace PSManagement.Domain.Projects.Aggregate namespace PSManagement.Domain.Projects.ValueObjects
{ {
public record Aggreement ( public record Aggreement(
int AggreementNumber , int AggreementNumber,
DateTime AggreementDate DateTime AggreementDate
); );
......
namespace PSManagement.Domain.Projects.ValueObjects
{
public record FinincialFund(
string FinicialStatus,
string Source
);
}
using System; using System;
namespace PSManagement.Domain.Projects.Aggregate namespace PSManagement.Domain.Projects.ValueObjects
{ {
public record ProjectInfo( public record ProjectInfo(
String Name , string Name,
String Code , string Code,
String Description string Description
); );
} }
using PSManagement.Domain.Customers.Aggregate; using PSManagement.Domain.Customers.Aggregate;
using System; using System;
namespace PSManagement.Domain.Projects.Aggregate namespace PSManagement.Domain.Projects.ValueObjects
{ {
public record ProposalInfo ( public record ProposalInfo(
int ProposingBookNumber , int ProposingBookNumber,
DateTime ProposingBookDate DateTime ProposingBookDate
); );
......
using PSManagement.SharedKernel.Entities; using PSManagement.SharedKernel.Entities;
namespace PSManagement.Domain.Projects.Entities namespace PSManagement.Domain.ProjectsStatus.Entites
{ {
public class ProjectStatus : BaseEntity public class ProjectStatus : BaseEntity
{ {
......
using PSManagement.Domain.Projects.Entities; using PSManagement.Domain.ProjectsStatus.Entites;
using PSManagement.SharedKernel.Repositories; using PSManagement.SharedKernel.Repositories;
namespace PSManagement.Domain.Projects.Repositories namespace PSManagement.Domain.ProjectsStatus.Repositories
{ {
public interface IProjectStatusRepository : IRepository<ProjectStatus> public interface IProjectStatusRepository : IRepository<ProjectStatus>
{ {
} }
} }
using PSManagement.Domain.Projects.Aggregate; using PSManagement.Domain.Projects.Entities;
using PSManagement.SharedKernel.Aggregate; using PSManagement.SharedKernel.Aggregate;
using PSManagement.SharedKernel.Entities; using PSManagement.SharedKernel.Entities;
using System; using System;
......
using PSManagement.SharedKernel.Entities;
using PSManagement.SharedKernel.ValueObjects;
using System;
namespace PSManagement.Domain.Steps.Entities
{
public class Item : BaseEntity
{
public string ItemName { get; set; }
public string ItemDescription { get; set; }
public Money Price { get; set; }
public Item()
{
}
}
}
using PSManagement.Domain.Steps.Entities; using PSManagement.Domain.Projects.Entities;
using PSManagement.SharedKernel.Entities; using PSManagement.SharedKernel.Entities;
using System.Collections.Generic; using System.Collections.Generic;
......
using PSManagement.Domain.Employees.Entities; using PSManagement.Domain.Employees.Entities;
using PSManagement.Domain.Projects.Aggregate; using PSManagement.Domain.Projects.Entities;
using PSManagement.Domain.Steps.Entities;
using PSManagement.Domain.Tracking.Entities; using PSManagement.Domain.Tracking.Entities;
using PSManagement.SharedKernel.Aggregate; using PSManagement.SharedKernel.Aggregate;
using PSManagement.SharedKernel.Entities; using PSManagement.SharedKernel.Entities;
......
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