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

@ -3,6 +3,7 @@ import { PlanTimeDefinition } from "../../../viewmodel/admin/unit/inspection/ins
import { inspectionVersionedPlan } from "./inspectionVersionedPlan";
import { equipmentType } from "../equipment/equipmentType";
import { vehicleType } from "../vehicle/vehicleType";
import { wearableType } from "../wearable/wearableType";
@Entity()
export class inspectionPlan {
@ -27,6 +28,9 @@ export class inspectionPlan {
@Column({ nullable: true, default: null })
vehicleTypeId?: string;
@Column({ nullable: true, default: null })
wearableTypeId?: string;
@ManyToOne(() => equipmentType, {
nullable: true,
onDelete: "CASCADE",
@ -41,6 +45,13 @@ export class inspectionPlan {
})
vehicleType?: vehicleType;
@ManyToOne(() => wearableType, {
nullable: true,
onDelete: "CASCADE",
onUpdate: "RESTRICT",
})
wearableType?: wearableType;
@OneToMany(() => inspectionVersionedPlan, (ivp) => ivp.inspectionPlan, {
cascade: ["insert"],
})