feat(shifts): add Shift CRUD API with sign-up/cancel and capacity management
- ShiftService with 7 methods: list, detail, create, update, delete, signup, cancel
- 5 DTOs: ShiftListDto, ShiftDetailDto, CreateShiftRequest, UpdateShiftRequest, ShiftSignupDto
- Minimal API endpoints: GET /api/shifts, GET /api/shifts/{id}, POST, PUT, DELETE, POST /signup, DELETE /signup
- Capacity validation: sign-up rejected when full → 409 Conflict
- Past shift blocking: cannot sign up for past shifts → 422 Unprocessable
- Duplicate signup prevention: check existing before create → 409 Conflict
- Concurrency: 2-attempt retry loop for last-slot race conditions
- Authorization: POST/PUT (Manager+), DELETE (Admin), signup/cancel (Member+)
- Test infrastructure: Added X-Test-UserId header support for member ID injection
- 13 TDD integration tests: CRUD, sign-up, capacity, past shift, concurrency
- Build: 0 errors (6 BouncyCastle warnings expected)
Task 15 complete. Wave 3: 3/5 tasks done.
This commit is contained in:
@@ -1431,7 +1431,7 @@ Max Concurrent: 6 (Wave 1)
|
||||
- Files: `backend/src/WorkClub.Api/Endpoints/Tasks/*.cs`, `backend/src/WorkClub.Application/Tasks/*.cs`
|
||||
- Pre-commit: `dotnet test backend/tests/ --filter "Tasks"`
|
||||
|
||||
- [ ] 15. Shift CRUD API + Sign-Up/Cancel Endpoints
|
||||
- [x] 15. Shift CRUD API + Sign-Up/Cancel Endpoints
|
||||
|
||||
**What to do**:
|
||||
- Create application services in `WorkClub.Application/Shifts/`:
|
||||
|
||||
Reference in New Issue
Block a user