enable backups for unit
This commit is contained in:
parent
9a1bf6dfde
commit
a69c3e048e
10 changed files with 85 additions and 21 deletions
|
@ -3,6 +3,7 @@ import { getTypeByORM } from "../../../migrations/ormHelper";
|
|||
import { equipmentType } from "./equipmentType";
|
||||
import { damageReport } from "../damageReport";
|
||||
import { inspection } from "../inspection/inspection";
|
||||
import { maintenance } from "../maintenance";
|
||||
|
||||
@Entity()
|
||||
export class equipment {
|
||||
|
@ -37,6 +38,9 @@ export class equipment {
|
|||
@OneToMany(() => damageReport, (d) => d.equipment, { cascade: ["insert"] })
|
||||
reports: damageReport[];
|
||||
|
||||
@OneToMany(() => inspection, (i) => i.equipment)
|
||||
@OneToMany(() => maintenance, (m) => m.equipment, { cascade: ["insert"] })
|
||||
maintenances: maintenance[];
|
||||
|
||||
@OneToMany(() => inspection, (i) => i.equipment, { cascade: ["insert"] })
|
||||
inspections: inspection[];
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ export class equipmentType {
|
|||
@OneToMany(() => equipment, (e) => e.equipmentType, { cascade: ["insert"] })
|
||||
equipment: equipment[];
|
||||
|
||||
@OneToMany(() => inspectionPlan, (ip) => ip.equipmentType)
|
||||
@OneToMany(() => inspectionPlan, (ip) => ip.equipmentType, { cascade: ["insert"] })
|
||||
inspectionPlans: inspectionPlan[];
|
||||
|
||||
equipmentCount: number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue