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.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
namespace Mws.Domain.Documents;
|
||||
|
||||
public enum DocumentType
|
||||
{
|
||||
Folder = 1,
|
||||
Document = 2,
|
||||
}
|
||||
|
||||
public class Document
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
public Guid? ParentId { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string? Content { get; set; }
|
||||
public DocumentType Type { get; set; } = DocumentType.Document;
|
||||
public Guid CreatedBy { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public Guid? UpdatedBy { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
public Document? Parent { get; set; }
|
||||
public List<Document> Children { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace Mws.Domain.Projects;
|
||||
|
||||
public enum ProjectStatus
|
||||
{
|
||||
Active = 1,
|
||||
Archived = 2,
|
||||
}
|
||||
|
||||
public class Project
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public ProjectStatus Status { get; set; } = ProjectStatus.Active;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
public List<ProjectMember> Members { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace Mws.Domain.Projects;
|
||||
|
||||
public enum MemberRole
|
||||
{
|
||||
Owner = 1,
|
||||
Member = 2,
|
||||
}
|
||||
|
||||
public class ProjectMember
|
||||
{
|
||||
public Guid ProjectId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public MemberRole Role { get; set; } = MemberRole.Member;
|
||||
|
||||
public Project Project { get; set; } = null!;
|
||||
public Mws.Domain.Users.User User { get; set; } = null!;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace Mws.Domain.Projects;
|
||||
|
||||
public static class ProjectPermissionScreens
|
||||
{
|
||||
public const string Documents = "documents";
|
||||
}
|
||||
|
||||
public class ProjectMemberPermission
|
||||
{
|
||||
public Guid ProjectId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public string Screen { get; set; } = string.Empty;
|
||||
public bool CanView { get; set; }
|
||||
public bool CanCreate { get; set; }
|
||||
public bool CanEdit { get; set; }
|
||||
public bool CanDelete { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Mws.Domain.Roles;
|
||||
|
||||
public class Role
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public bool IsSystem { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
public List<RolePermission> Permissions { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Mws.Domain.Roles;
|
||||
|
||||
public class RolePermission
|
||||
{
|
||||
public Guid RoleId { get; set; }
|
||||
public string Screen { get; set; } = string.Empty;
|
||||
public bool CanView { get; set; }
|
||||
public bool CanCreate { get; set; }
|
||||
public bool CanEdit { get; set; }
|
||||
public bool CanDelete { get; set; }
|
||||
|
||||
public Role Role { get; set; } = null!;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
namespace Mws.Domain.Tasks;
|
||||
|
||||
public enum TaskStatus
|
||||
{
|
||||
Todo = 1,
|
||||
InProgress = 2,
|
||||
Done = 3,
|
||||
Cancelled = 4,
|
||||
}
|
||||
|
||||
public enum TaskPriority
|
||||
{
|
||||
Low = 1,
|
||||
Medium = 2,
|
||||
High = 3,
|
||||
}
|
||||
|
||||
public class TaskItem
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public TaskStatus Status { get; set; } = TaskStatus.Todo;
|
||||
public TaskPriority Priority { get; set; } = TaskPriority.Medium;
|
||||
public Guid? AssigneeId { get; set; }
|
||||
public DateTime? DueDate { get; set; }
|
||||
public Guid CreatedBy { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
public Mws.Domain.Users.User? Assignee { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Mws.Domain.Roles;
|
||||
|
||||
namespace Mws.Domain.Users;
|
||||
|
||||
public class User
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Username { get; set; } = string.Empty;
|
||||
public string PasswordHash { get; set; } = string.Empty;
|
||||
public string DisplayName { get; set; } = string.Empty;
|
||||
public Guid RoleId { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
public Role Role { get; set; } = null!;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user