feat: Intégration du backend NestJS depuis YNOV
- Framework: NestJS avec TypeORM - Authentification: JWT (access + refresh tokens) - Gestion utilisateurs: CRUD complet avec validation - Routes: auth, users, parents, assistantes maternelles - Dockerfile pour conteneurisation
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { Column, CreateDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
import { Contrat } from "./contrats.entity";
|
||||
import { Users } from "./users.entity";
|
||||
|
||||
export enum StatutAvenantType {
|
||||
PROPOSE = 'propose',
|
||||
ACCEPTE = 'accepte',
|
||||
REFUSE = 'refuse',
|
||||
}
|
||||
|
||||
@Entity('avenants_contrats')
|
||||
export class AvenantContrat {
|
||||
// Define your columns and relationships here
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@ManyToOne(() => Contrat, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'id_contrat' })
|
||||
contrat: Contrat;
|
||||
|
||||
@Column({ type: 'jsonb', nullable: true, name: 'modifications' })
|
||||
modifications?: any;
|
||||
|
||||
@ManyToOne(() => Users, { nullable: true })
|
||||
@JoinColumn({ name: 'initie_par', referencedColumnName: 'id' })
|
||||
initiator?: Users;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: StatutAvenantType,
|
||||
enumName: 'statut_avenant_type',
|
||||
default: StatutAvenantType.PROPOSE,
|
||||
name: 'statut'
|
||||
})
|
||||
statut: StatutAvenantType;
|
||||
|
||||
@CreateDateColumn({ name: 'cree_le', type: 'timestamptz' })
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ name: 'modifie_le', type: 'timestamptz' })
|
||||
updatedAt: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user