Commit 3610daea authored by hasan khaddour's avatar hasan khaddour

Add some contracts for project domains.

parent dc822b12
using PSManagement.Domain.Employees.Entities;
namespace PSManagement.Contracts.Projects.Response
{
public class EmployeeResponse
{
public int Id { get; set; }
public int HIASTId { get; set; }
public int UserId { get; set; }
public PersonalInfo PersonalInfo { get; set; }
public WorkInfo WorkInfo { get; set; }
}
}
\ No newline at end of file
using PSManagement.SharedKernel.ValueObjects;
using System;
namespace PSManagement.Contracts.Projects.Response
{
public class FinancialSpendingResponse
{
public int Id { get; set; }
public DateTime ExpectedSpendingDate { get; set; }
public String CostType { get; set; }
public String Description { get; set; }
public int LocalPurchase { get; set; }
public Money ExternalPurchase { get; set; }
}
}
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
...@@ -9,7 +10,16 @@ ...@@ -9,7 +10,16 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\PSManagement.Application\PSManagement.Application.csproj" />
<ProjectReference Include="..\PSManagement.Domain\PSManagement.Domain.csproj" /> <ProjectReference Include="..\PSManagement.Domain\PSManagement.Domain.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Employees\Requests\" />
<Folder Include="FinancialSpends\Requests\" />
<Folder Include="Steps\Requests\" />
<Folder Include="Tracks\Response\" />
<Folder Include="Tracks\Requests\" />
</ItemGroup>
</Project> </Project>
...@@ -8,4 +8,5 @@ namespace PSManagement.Contracts.Projects.Requests ...@@ -8,4 +8,5 @@ namespace PSManagement.Contracts.Projects.Requests
String AttachmentDescription, String AttachmentDescription,
String AttachmentName, String AttachmentName,
IFormFile File); IFormFile File);
} }
using System;
namespace PSManagement.Contracts.Projects.Requests
{
public record AddParticipantRequest(
int ProjectId,
int ParticipantId,
int PartialTimeRatio,
String Role
);
}
using PSManagement.Domain.Projects.ValueObjects;
namespace PSManagement.Contracts.Projects.Requests
{
public record AddProjectStepRequest(
int ProjectId,
StepInfo StepInfo,
int CurrentCompletionRatio,
int Weight
);
}
using PSManagement.Domain.Projects.ValueObjects;
namespace PSManagement.Contracts.Projects.Requests
{
public record ApproveProjectRequest(
Aggreement ProjectAggreement,
int ProjectId
);
}
namespace PSManagement.Contracts.Projects.Requests
{
public record CancelProjectRequest(
int EmployeeId,
int ProjectId
);
}
namespace PSManagement.Contracts.Projects.Requests
{
public record ChangeProjectTeamLeaderRequest(
int EmployeeId,
int ProjectId
);
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PSManagement.Contracts.Projects.Requests
{
public record ListAllProjectsRequest(
int? PageNumber,
int? PageSize
) ;
}
namespace PSManagement.Contracts.Projects.Requests
{
public record RemoveParticipantRequest(
int ProjectId,
int ParticipantId
);
}
using PSManagement.Domain.Projects.ValueObjects; using PSManagement.Domain.Projects.ValueObjects;
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -16,4 +15,5 @@ namespace PSManagement.Contracts.Projects.Response ...@@ -16,4 +15,5 @@ namespace PSManagement.Contracts.Projects.Response
int ProjectManagerId, int ProjectManagerId,
int ExecuterId int ExecuterId
); );
} }
using PSManagement.Application.Employees.Common;
namespace PSManagement.Contracts.Projects.Response
{
public class EmployeeParticipateResponse
{
public int EmployeeId { get; set; }
public int ProjectId { get; set; }
public EmployeResponse Employee { get; set; }
public int PartialTimeRatio { get; set; }
public string Role { get; set; }
}
}
\ No newline at end of file
using PSManagement.Contracts.Customers.Responses;
using PSManagement.Domain.Employees.Entities;
using PSManagement.Domain.Projects.Entities;
using PSManagement.Domain.Projects.ValueObjects;
using System.Collections.Generic;
namespace PSManagement.Contracts.Projects.Response
{
public class ProjectResponse
{
public int Id { get; set; }
public ProposalInfo ProposalInfo { get; set; }
public ProjectInfo ProjectInfo { get; set; }
public string CurrentState { get; set; }
public Aggreement ProjectAggreement { get; set; }
public int TeamLeaderId { get; set; }
public EmployeeResponse TeamLeader { get; set; }
public int ProjectManagerId { get; set; }
public EmployeeResponse ProjectManager { get; set; }
public int ExecuterId { get; set; }
public Department Executer { get; set; }
public int ProposerId { get; private set; }
public CustomerRecord Proposer { get; set; }
public ICollection<StepResponse> Steps { get; set; }
public ICollection<Attachment> Attachments { get; set; }
public FinancialFund FinancialFund { get; set; }
public ICollection<FinancialSpendingResponse> FinancialSpending { get; set; }
public ICollection<EmployeeParticipateResponse> EmployeeParticipates { get; set; }
}
}
using PSManagement.Domain.Projects.ValueObjects;
namespace PSManagement.Contracts.Projects.Response
{
public class StepResponse
{
public int Id { get; set; }
public StepInfo StepInfo { get; set; }
public int CurrentCompletionRatio { get; set; }
public int Weight { get; set; }
public int ProjectId { get; set; }
}
}
\ No newline at end of file
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