- Création DTOs (UploadDocumentDto, DocumentsActifsResponseDto, DocumentVersionDto) - Création DocumentsLegauxController avec 6 endpoints: * GET /documents-legaux/actifs (public) * GET /documents-legaux/:type/versions (admin) * POST /documents-legaux (upload, admin) * PATCH /documents-legaux/:id/activer (admin) * GET /documents-legaux/:id/download (public) * GET /documents-legaux/:id/verifier-integrite (admin) - Support upload multipart/form-data avec FileInterceptor - Validation des types (cgu/privacy) - Stream PDF pour téléchargement - Intégration dans DocumentsLegauxModule - Compilation OK TODO: Ajouter guards auth (JwtAuthGuard, RolesGuard) Réf: docs/22_DOCUMENTS-LEGAUX.md
14 lines
234 B
TypeScript
14 lines
234 B
TypeScript
export class DocumentActifDto {
|
|
id: string;
|
|
type: 'cgu' | 'privacy';
|
|
version: number;
|
|
url: string;
|
|
activeLe: Date | null;
|
|
}
|
|
|
|
export class DocumentsActifsResponseDto {
|
|
cgu: DocumentActifDto;
|
|
privacy: DocumentActifDto;
|
|
}
|
|
|