81 lines
2.4 KiB
C#
81 lines
2.4 KiB
C#
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; }
|
|
} |