change according to connection from frontend
This commit is contained in:
parent
2609ecc1bf
commit
e3db523a0e
36 changed files with 611 additions and 173 deletions
|
@ -1,8 +1,8 @@
|
|||
import { Column, CreateDateColumn, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { equipment } from "../equipment/equipment";
|
||||
import { vehicle } from "../vehicle/vehicle";
|
||||
import { PlanTimeDefinition } from "../../../viewmodel/admin/unit/inspection/inspectionPlan.models";
|
||||
import { inspectionVersionedPlan } from "./inspectionVersionedPlan";
|
||||
import { equipmentType } from "../equipment/equipmentType";
|
||||
import { vehicleType } from "../vehicle/vehicleType";
|
||||
|
||||
@Entity()
|
||||
export class inspectionPlan {
|
||||
|
@ -22,24 +22,24 @@ export class inspectionPlan {
|
|||
createdAt: Date;
|
||||
|
||||
@Column()
|
||||
equipmentId?: string;
|
||||
equipmentTypeId?: string;
|
||||
|
||||
@Column()
|
||||
vehicleId?: string;
|
||||
vehicleTypeId?: string;
|
||||
|
||||
@ManyToOne(() => equipment, {
|
||||
@ManyToOne(() => equipmentType, {
|
||||
nullable: true,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
equipment?: equipment;
|
||||
equipmentType?: equipmentType;
|
||||
|
||||
@ManyToOne(() => vehicle, {
|
||||
@ManyToOne(() => vehicleType, {
|
||||
nullable: true,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
vehicle?: vehicle;
|
||||
vehicleType?: vehicleType;
|
||||
|
||||
@OneToMany(() => inspectionVersionedPlan, (ivp) => ivp.inspectionPlan, {
|
||||
cascade: ["insert"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue