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,22 @@
|
||||
import {
|
||||
Entity, ManyToOne, JoinColumn, PrimaryColumn
|
||||
} from 'typeorm';
|
||||
import { Parents } from './parents.entity';
|
||||
import { Children } from './children.entity';
|
||||
|
||||
@Entity('enfants_parents', { schema: 'public' })
|
||||
export class ParentsChildren {
|
||||
@PrimaryColumn('uuid', { name: 'id_parent' })
|
||||
parentId: string;
|
||||
|
||||
@PrimaryColumn('uuid', { name: 'id_enfant' })
|
||||
enfantId: string;
|
||||
|
||||
@ManyToOne(() => Parents, p => p.parentChildren, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'id_parent', referencedColumnName: 'user_id' })
|
||||
parent: Parents;
|
||||
|
||||
@ManyToOne(() => Children, c => c.parentLinks, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'id_enfant', referencedColumnName: 'id' })
|
||||
child: Children;
|
||||
}
|
||||
Reference in New Issue
Block a user