Files
Tasks.Module/Models/TodoItem.cs
T
2026-08-07 02:17:32 +03:00

95 lines
3.0 KiB
C#

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