feat(backend): service gestion documents légaux #8
- Création entité DocumentLegal - Création entité AcceptationDocument - Création DocumentsLegauxService avec méthodes: * getDocumentsActifs() * uploadNouvelleVersion() (avec hash SHA-256) * activerVersion() (transaction) * listerVersions() * telechargerDocument() * verifierIntegrite() * enregistrerAcceptation() * getAcceptationsUtilisateur() - Création DocumentsLegauxModule - Intégration dans AppModule - Ajout dépendances multer + @types/multer Réf: docs/22_DOCUMENTS-LEGAUX.md
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
CreateDateColumn,
|
||||
} from 'typeorm';
|
||||
import { Users } from './users.entity';
|
||||
|
||||
@Entity('documents_legaux')
|
||||
export class DocumentLegal {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 50, nullable: false })
|
||||
type: 'cgu' | 'privacy';
|
||||
|
||||
@Column({ type: 'integer', nullable: false })
|
||||
version: number;
|
||||
|
||||
@Column({ type: 'varchar', length: 255, nullable: false })
|
||||
fichier_nom: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 500, nullable: false })
|
||||
fichier_path: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 64, nullable: false })
|
||||
fichier_hash: string;
|
||||
|
||||
@Column({ type: 'boolean', default: false })
|
||||
actif: boolean;
|
||||
|
||||
@ManyToOne(() => Users, { nullable: true })
|
||||
@JoinColumn({ name: 'televerse_par' })
|
||||
televersePar: Users | null;
|
||||
|
||||
@CreateDateColumn({ name: 'televerse_le', type: 'timestamptz' })
|
||||
televerseLe: Date;
|
||||
|
||||
@Column({ name: 'active_le', type: 'timestamptz', nullable: true })
|
||||
activeLe: Date | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user