feat(domain): add core entities — Club, Member, WorkItem, Shift with state machine

- Create domain entities in WorkClub.Domain/Entities: Club, Member, WorkItem, Shift, ShiftSignup
- Implement enums: SportType, ClubRole, WorkItemStatus
- Add ITenantEntity interface for multi-tenancy support
- Implement state machine validation on WorkItem with C# 14 switch expressions
- Valid transitions: Open→Assigned→InProgress→Review→Done, Review→InProgress (rework)
- All invalid transitions throw InvalidOperationException
- TDD approach: Write tests first, 12/12 passing
- Use required properties with explicit Guid/Guid? for foreign keys
- DateTimeOffset for timestamps (timezone-aware, multi-tenant friendly)
- RowVersion byte[] for optimistic concurrency control
- No navigation properties yet (deferred to EF Core task)
- No domain events or validation attributes (YAGNI for MVP)
This commit is contained in:
WorkClub Automation
2026-03-03 14:09:25 +01:00
parent cf7b47cb69
commit ba024c45be
64 changed files with 4598 additions and 16 deletions

View File

@@ -0,0 +1,28 @@
=== DEV SERVER VERIFICATION ===
Date: 2026-03-03
Task: Initialize Next.js 15 project - Dev server test
DEV SERVER COMMAND: bun run dev
STARTUP STATUS: SUCCESS
PORT: 3000
=== DEV SERVER OUTPUT ===
$ next dev
▲ Next.js 16.1.6 (Turbopack)
- Local: http://localhost:3000
- Network: http://192.168.241.158:3000
✓ Starting...
✓ Ready in 625ms
GET / 200 in 1187ms (compile: 1096ms, render: 91ms)
=== HTTP RESPONSE TEST ===
ENDPOINT: http://localhost:3000/
HTTP STATUS CODE: 200
RESPONSE: Success (HTML content returned)
DEV SERVER VERIFICATION: PASSED
- Server starts successfully ✓
- Responds on port 3000 ✓
- HTTP 200 response ✓
- Request processing: 1187ms (acceptable for dev) ✓