extend wearable and enable maintenance

This commit is contained in:
Julian Krauser 2025-06-13 11:31:34 +02:00
parent aeb1ccbc42
commit b8b2186c58
20 changed files with 457 additions and 93 deletions

View file

@ -47,4 +47,7 @@ export class wearable {
@OneToMany(() => damageReport, (d) => d.wearable, { cascade: ["insert"] })
reports: damageReport[];
@OneToMany(() => inspection, (i) => i.wearable)
inspections: inspection[];
}

View file

@ -1,5 +1,6 @@
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { wearable as wearable } from "./wearable";
import { inspectionPlan } from "../inspection/inspectionPlan";
@Entity()
export class wearableType {
@ -14,4 +15,7 @@ export class wearableType {
@OneToMany(() => wearable, (e) => e.wearableType, { cascade: ["insert"] })
wearable: wearable[];
@OneToMany(() => inspectionPlan, (ip) => ip.wearableType)
inspectionPlans: inspectionPlan[];
}