db schema connects

This commit is contained in:
Julian Krauser 2025-05-28 17:06:45 +02:00
parent baa3b2cc8c
commit 8c81c8f336
7 changed files with 33 additions and 2 deletions

View file

@ -2,6 +2,7 @@ import { Column, ColumnType, Entity, ManyToOne, OneToMany, PrimaryGeneratedColum
import { getTypeByORM } from "../../../migrations/ormHelper";
import { vehicleType } from "./vehicleType";
import { damageReport } from "../damageReport";
import { inspection } from "../inspection/inspection";
@Entity()
export class vehicle {
@ -35,4 +36,7 @@ export class vehicle {
@OneToMany(() => damageReport, (d) => d.vehicle, { cascade: ["insert"] })
reports: damageReport[];
@OneToMany(() => inspection, (i) => i.vehicle)
inspections: inspection[];
}