ref: project structure

This commit is contained in:
2026-08-19 23:25:08 +07:00
parent 05a93cfc09
commit a1fe31cf70
155 changed files with 3339 additions and 1007 deletions
+81
View File
@@ -0,0 +1,81 @@
using mws.backend.dotnet.domain.Projects;
namespace mws.backend.dotnet.application.Projects;
public class CreateProjectRequest
{
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
}
public class UpdateProjectRequest
{
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public ProjectStatus Status { get; set; } = ProjectStatus.Active;
}
public class AddMemberRequest
{
public Guid UserId { get; set; }
public MemberRole Role { get; set; } = MemberRole.Member;
}
public class ProjectMemberDto
{
public Guid UserId { get; set; }
public string Username { get; set; } = string.Empty;
public string DisplayName { get; set; } = string.Empty;
public MemberRole Role { get; set; }
public bool CanViewDocuments { get; set; }
public bool CanCreateDocuments { get; set; }
public bool CanEditDocuments { get; set; }
public bool CanDeleteDocuments { get; set; }
}
public class UpdateMemberDocumentPermissionsRequest
{
public bool CanViewDocuments { get; set; }
public bool CanCreateDocuments { get; set; }
public bool CanEditDocuments { get; set; }
public bool CanDeleteDocuments { get; set; }
}
public class ProjectDto
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public ProjectStatus Status { get; set; }
public Guid CreatedBy { get; set; }
public string CreatedByName { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; }
public Guid? UpdatedBy { get; set; }
public string? UpdatedByName { get; set; }
public DateTime UpdatedAt { get; set; }
}
public class ProjectOverviewDto
{
public ProjectDto Project { get; set; } = null!;
public int MemberCount { get; set; }
public int DocumentCount { get; set; }
public Dictionary<string, int> TaskCountsByStatus { get; set; } = [];
public List<RecentTaskDto> RecentTasks { get; set; } = [];
public List<RecentDocumentDto> RecentDocuments { get; set; } = [];
}
public class RecentTaskDto
{
public Guid Id { get; set; }
public string Title { get; set; } = string.Empty;
public string Status { get; set; } = string.Empty;
public DateTime UpdatedAt { get; set; }
}
public class RecentDocumentDto
{
public Guid Id { get; set; }
public string Title { get; set; } = string.Empty;
public DateTime UpdatedAt { get; set; }
}