Implement a complete repair ticket lifecycle, including an intake form for creating new tickets, an auto-incrementing ticket numbering system, a finite state machine (FSM) for status transitions (e.g., RECEIVED, DIAGNOSING, IN_REPAIR), and API endpoints for creating, updating status, and assigning tickets.
## Goal Complete repair ticket lifecycle from intake to retrieval. ## Ticket Numbering Format: `REP-2026-001` (auto-incremented per year) ## Status Workflow (FSM) ``` RECEIVED → DIAGNOSING → QUOTE_PENDING → QUOTE_ACCEPTED → IN_REPAIR → READY → RETRIEVED → QUOTE_REJECTED → ABANDONED ``` ## API Endpoints - [ ] `POST /repairs` — create repair ticket (intake) - [ ] `PUT /repairs/:id/status` — transition to next status (validated transitions only) - [ ] `POST /repairs/:id/assign` — assign technician - [ ] `POST /repairs/:id/quote` — create repair quote from ticket - [ ] `GET /repairs` — list with filters (status, tech, client, date) - [ ] `GET /repairs/:id` — full repair detail ## Device Information (JSON) ```json { "brand": "Samsung", "model": "Galaxy S21", "imei": "...", "serialNumber": "...", "accessories": ["chargeur", "coque"] } ``` ## Frontend - [ ] Repair intake form with device info fields - [ ] Status transition buttons per allowed next status - [ ] Technicia