Files
Backend-Api/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/DTOs/ProjectHierarchyDtos.cs

129 lines
4.4 KiB
C#

namespace GozareshgirProgramManager.Application.Modules.Projects.DTOs;
/// <summary>
/// DTO for Project entity
/// </summary>
public class ProjectDto
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public DateTime CreationDate { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
public DateTime? PlannedStartDate { get; set; }
public DateTime? PlannedEndDate { get; set; }
public string Status { get; set; } = string.Empty;
public TimeSpan? AllocatedTime { get; set; }
public bool HasTimeOverride { get; set; }
public bool HasAssignmentOverride { get; set; }
public TimeSpan TotalTimeSpent { get; set; }
public TimeSpan TotalEstimatedTime { get; set; }
public List<ProjectPhaseDto> Phases { get; set; } = new();
}
/// <summary>
/// DTO for ProjectPhase entity
/// </summary>
public class ProjectPhaseDto
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public DateTime CreationDate { get; set; }
public Guid ProjectId { get; set; }
public string Status { get; set; } = string.Empty;
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
public int OrderIndex { get; set; }
public TimeSpan? AllocatedTime { get; set; }
public bool HasTimeOverride { get; set; }
public bool HasAssignmentOverride { get; set; }
public TimeSpan TotalTimeSpent { get; set; }
public TimeSpan TotalEstimatedTime { get; set; }
public List<ProjectTaskDto> Tasks { get; set; } = new();
}
/// <summary>
/// DTO for ProjectTask entity
/// </summary>
public class ProjectTaskDto
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public DateTime CreationDate { get; set; }
public Guid PhaseId { get; set; }
public string Status { get; set; } = string.Empty;
public string Priority { get; set; } = string.Empty;
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
public DateTime? DueDate { get; set; }
public int OrderIndex { get; set; }
public TimeSpan? AllocatedTime { get; set; }
public bool HasTimeOverride { get; set; }
public bool HasAssignmentOverride { get; set; }
public TimeSpan TotalTimeSpent { get; set; }
public TimeSpan TotalEstimatedTime { get; set; }
public List<ProjectSectionDto> Sections { get; set; } = new();
}
/// <summary>
/// DTO for TaskSection entity
/// </summary>
public class ProjectSectionDto
{
public Guid Id { get; set; }
public Guid TaskId { get; set; }
public Guid SkillId { get; set; }
public string SkillName { get; set; } = string.Empty;
public TimeSpan InitialEstimatedHours { get; set; }
public string? InitialDescription { get; set; }
public string Status { get; set; } = string.Empty;
public long CurrentAssignedUserId { get; set; }
public string? CurrentAssignedUserName { get; set; }
public DateTime CreationDate { get; set; }
public TimeSpan FinalEstimatedHours { get; set; }
public TimeSpan TotalTimeSpent { get; set; }
public double ProgressPercentage { get; set; }
public bool IsCompleted { get; set; }
public bool IsInProgress { get; set; }
public List<TaskSectionActivityDto> Activities { get; set; } = new();
public List<TaskSectionAdditionalTimeDto> AdditionalTimes { get; set; } = new();
}
/// <summary>
/// DTO for ProjectSectionActivity entity
/// </summary>
public class TaskSectionActivityDto
{
public Guid Id { get; set; }
public Guid SectionId { get; set; }
public long UserId { get; set; }
public string? UserName { get; set; }
public DateTime StartDate { get; set; }
public DateTime? EndDate { get; set; }
public string? Notes { get; set; }
public string? EndNotes { get; set; }
public bool IsActive { get; set; }
public TimeSpan TimeSpent { get; set; }
}
/// <summary>
/// DTO for ProjectSectionAdditionalTime entity
/// </summary>
public class TaskSectionAdditionalTimeDto
{
public Guid Id { get; set; }
public TimeSpan Hours { get; set; }
public string? Reason { get; set; }
public long? AddedByUserId { get; set; }
public string? AddedByUserName { get; set; }
public DateTime AddedAt { get; set; }
}