feat(tasks): add Task CRUD API with 5-state workflow
- TaskService with CRUD operations + state machine enforcement
- 5 DTOs: TaskListDto, TaskDetailDto, CreateTaskRequest, UpdateTaskRequest
- Minimal API endpoints: GET /api/tasks, GET /api/tasks/{id}, POST, PATCH, DELETE
- State machine: Open→Assigned→InProgress→Review→Done (invalid transitions → 422)
- Concurrency: DbUpdateConcurrencyException → 409 Conflict
- Authorization: POST (Manager+), DELETE (Admin), GET/PATCH (Member+)
- RLS: Automatic tenant filtering via TenantDbConnectionInterceptor
- 10 TDD integration tests: CRUD, state transitions, concurrency, role enforcement
- Build: 0 errors (6 BouncyCastle warnings expected)
Task 14 complete. Wave 3: 2/5 tasks done.
This commit is contained in:
16
backend/WorkClub.Application/Tasks/DTOs/TaskListDto.cs
Normal file
16
backend/WorkClub.Application/Tasks/DTOs/TaskListDto.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace WorkClub.Application.Tasks.DTOs;
|
||||
|
||||
public record TaskListDto(
|
||||
List<TaskListItemDto> Items,
|
||||
int Total,
|
||||
int Page,
|
||||
int PageSize
|
||||
);
|
||||
|
||||
public record TaskListItemDto(
|
||||
Guid Id,
|
||||
string Title,
|
||||
string Status,
|
||||
Guid? AssigneeId,
|
||||
DateTimeOffset CreatedAt
|
||||
);
|
||||
Reference in New Issue
Block a user