refactor: reorganize Application layer into folder structure

This commit is contained in:
2026-06-01 18:15:17 +03:30
parent dca3fc62ca
commit 775ae0d9b4
50 changed files with 618 additions and 492 deletions

View File

@@ -0,0 +1,79 @@
namespace GreenHome.Application;
public sealed class ChecklistDto
{
public int Id { get; set; }
public int DeviceId { get; set; }
public string DeviceName { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public string? Description { get; set; }
public bool IsActive { get; set; }
public List<ChecklistItemDto> Items { get; set; } = new();
public DateTime CreatedAt { get; set; }
public int CreatedByUserId { get; set; }
public string CreatedByUserName { get; set; } = string.Empty;
}
public sealed class ChecklistItemDto
{
public int Id { get; set; }
public string Title { get; set; } = string.Empty;
public string? Description { get; set; }
public int Order { get; set; }
public bool IsRequired { get; set; }
}
public sealed class CreateChecklistRequest
{
public required int DeviceId { get; set; }
public required int CreatedByUserId { get; set; }
public required string Title { get; set; }
public string? Description { get; set; }
public required List<CreateChecklistItemRequest> Items { get; set; }
}
public sealed class CreateChecklistItemRequest
{
public required string Title { get; set; }
public string? Description { get; set; }
public int Order { get; set; }
public bool IsRequired { get; set; }
}
public sealed class ChecklistCompletionDto
{
public int Id { get; set; }
public int ChecklistId { get; set; }
public string ChecklistTitle { get; set; } = string.Empty;
public int CompletedByUserId { get; set; }
public string CompletedByUserName { get; set; } = string.Empty;
public string PersianDate { get; set; } = string.Empty;
public List<ChecklistItemCompletionDto> ItemCompletions { get; set; } = new();
public string? Notes { get; set; }
public DateTime CompletedAt { get; set; }
}
public sealed class ChecklistItemCompletionDto
{
public int Id { get; set; }
public int ChecklistItemId { get; set; }
public string ItemTitle { get; set; } = string.Empty;
public bool IsChecked { get; set; }
public string? Note { get; set; }
}
public sealed class CompleteChecklistRequest
{
public required int ChecklistId { get; set; }
public required int CompletedByUserId { get; set; }
public required string PersianDate { get; set; }
public required List<CompleteChecklistItemRequest> ItemCompletions { get; set; }
public string? Notes { get; set; }
}
public sealed class CompleteChecklistItemRequest
{
public required int ChecklistItemId { get; set; }
public bool IsChecked { get; set; }
public string? Note { get; set; }
}