Initial commit: Tasks.Module

This commit is contained in:
Saidamin Kattan
2026-08-07 02:17:32 +03:00
commit 46aa82d0c7
97 changed files with 7443 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
namespace Tasks.Module.Models;
public class CategoryDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public string? ParentId { get; set; }
public string? UserId { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public List<CategoryDto> Children { get; set; } = new();
}
public class CreateCategoryDto
{
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public string? ParentId { get; set; }
}
public class UpdateCategoryDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public string? ParentId { get; set; }
}
public class TagDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string? Color { get; set; }
public string? UserId { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
}
public class CreateTagDto
{
public string Name { get; set; } = string.Empty;
public string? Color { get; set; }
}
public class UpdateTagDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string? Color { get; set; }
}
+89
View File
@@ -0,0 +1,89 @@
namespace Tasks.Module.Models;
public class FolderDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string? ParentId { get; set; }
public string? UserId { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public List<FolderDto> Children { get; set; } = new();
public List<FileReferenceDto> Files { get; set; } = new();
public List<TasksSheetDto> TasksSheets { get; set; } = new();
}
public class CreateFolderDto
{
public string Name { get; set; } = string.Empty;
public string? ParentId { get; set; }
}
public class UpdateFolderDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string? ParentId { get; set; }
}
public class FileReferenceDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Type { get; set; } = string.Empty;
public string? ParentId { get; set; }
public string? ContentPath { get; set; }
public string? UserId { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
}
public class CreateFileReferenceDto
{
public string Name { get; set; } = string.Empty;
public string Type { get; set; } = string.Empty;
public string? ParentId { get; set; }
public string? ContentPath { get; set; }
}
public class TasksSheetDto
{
public string Id { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public string? Description { get; set; }
public string? ParentFolderId { get; set; }
public string? UserId { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public string? CategoryId { get; set; }
public List<string> TagIds { get; set; } = new();
public List<TodoItemDto> Tasks { get; set; } = new();
}
public class CreateTasksSheetDto
{
public string Title { get; set; } = string.Empty;
public string? Description { get; set; }
public string? ParentFolderId { get; set; }
public string? CategoryId { get; set; }
public List<string> TagIds { get; set; } = new();
}
public class TreeItemDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public TreeItemType Type { get; set; }
public string? ParentId { get; set; }
public List<TreeItemDto> Children { get; set; } = new();
public bool IsExpanded { get; set; } = false;
public bool IsDragOver { get; set; } = false;
public bool IsDragSource { get; set; } = false;
}
public enum TreeItemType
{
Folder,
TasksSheet,
Document
}
+95
View File
@@ -0,0 +1,95 @@
namespace Tasks.Module.Models;
public class TodoItemDto
{
public string Id { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public string? Description { get; set; }
public bool IsCompleted { get; set; }
public DateTime? DueDate { get; set; }
public int Priority { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public string? UserId { get; set; }
public string? ParentId { get; set; }
public string? CategoryId { get; set; }
public List<string> TagIds { get; set; } = new();
public string? FileId { get; set; }
public List<TodoItemDto> Children { get; set; } = new();
}
public class CreateTodoItemDto
{
public string Title { get; set; } = string.Empty;
public string? Description { get; set; }
public int Priority { get; set; } = 0;
public DateTime? DueDate { get; set; }
public string? ParentId { get; set; }
public string? CategoryId { get; set; }
public List<string> TagIds { get; set; } = new();
public string? FileId { get; set; }
}
public class UpdateTodoItemDto
{
public string Id { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public string? Description { get; set; }
public bool IsCompleted { get; set; }
public int Priority { get; set; }
public DateTime? DueDate { get; set; }
public string? ParentId { get; set; }
public string? CategoryId { get; set; }
public List<string> TagIds { get; set; } = new();
public string? FileId { get; set; }
}
public class TodoFilterDto
{
public bool? IsCompleted { get; set; }
public int? Priority { get; set; }
public DateTime? DueDate { get; set; }
public string? ParentId { get; set; }
}
public class TaskViewDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public int? Priority { get; set; }
public bool? IsCompleted { get; set; }
public DateTime? DueDateFrom { get; set; }
public DateTime? DueDateTo { get; set; }
public string? ContainsText { get; set; }
public string? UserId { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
}
public class CreateTaskViewDto
{
public string Name { get; set; } = string.Empty;
public int? Priority { get; set; }
public bool? IsCompleted { get; set; }
public DateTime? DueDateFrom { get; set; }
public DateTime? DueDateTo { get; set; }
public string? ContainsText { get; set; }
}
public class UpdateTaskViewDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public int? Priority { get; set; }
public bool? IsCompleted { get; set; }
public DateTime? DueDateFrom { get; set; }
public DateTime? DueDateTo { get; set; }
public string? ContainsText { get; set; }
}
public class FlatCategory
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public int Depth { get; set; }
}