Context
I contatti sono l'entita' piu' usata nel CRM. Serve un repository dedicato che esponga le operazioni CRUD conformi all'interfaccia Contact.
Objective
Creare src/db/repositories/contact-repository.ts con:
- getAllContacts(): Contact[]
- getContactById(id: string): Contact | null
- createContact(data): Contact (genera UUID, setta createdAt/updatedAt)
- updateContact(id, data): Contact | null (aggiorna updatedAt)
- removeContact(id): boolean (elimina record + righe nelle join tables)
- getContactsByCompany(companyId): Contact[]
Acceptance Criteria
Dependencies
Depends on: #6
Notes
Phase: Fase 2
Ref: FR-004
Context
I contatti sono l'entita' piu' usata nel CRM. Serve un repository dedicato che esponga le operazioni CRUD conformi all'interfaccia Contact.
Objective
Creare src/db/repositories/contact-repository.ts con:
Acceptance Criteria
Dependencies
Depends on: #6
Notes
Phase: Fase 2
Ref: FR-004