Files
mws.backend.dotnet/mws.application/Projects/Contracts.cs
T
namdh f72aaa2329 Commit MWS backend source tree
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.
2026-08-13 23:10:22 +07:00

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; }
}