The ASP.NET Core solution (mws.api/mws.application/mws.domain/ mws.infrastructure) existed only as untracked working files. Adding it to version control, plus a .gitignore for build output and local tooling directories, so the CQRS/mediator refactor plan has a real git history to branch and diff against.
77 lines
2.2 KiB
C#
77 lines
2.2 KiB
C#
using Mws.Domain.Projects;
|
|
|
|
namespace Mws.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 DateTime CreatedAt { 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; }
|
|
} |