extend wearable and enable maintenance
This commit is contained in:
parent
aeb1ccbc42
commit
b8b2186c58
20 changed files with 457 additions and 93 deletions
|
@ -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"],
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue