update
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, JoinTable, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
import { TrxMaintenancePosition, TrxMaintenanceStatus } from "../types/trx";
|
||||
import { TrxMaintenance } from "./trx_maintenances";
|
||||
import { TrxCustomer } from "./trx_customers";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxMaintenanceGroupStatus } from "../types/trx";
|
||||
|
||||
@ -9,6 +10,9 @@ export class TrxMaintenanceGroup {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@OneToMany(() => TrxCustomer, (customer) => customer.id)
|
||||
customer: TrxCustomer[];
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 256,
|
||||
|
||||
@ -19,6 +19,10 @@ export class TrxMaintenance {
|
||||
@JoinTable()
|
||||
maintenance_group: TrxMaintenanceGroup;
|
||||
|
||||
@ManyToOne(() => TrxCustomer, { onDelete: "NO ACTION" })
|
||||
@JoinTable()
|
||||
customer: TrxCustomer;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64,
|
||||
|
||||
Reference in New Issue
Block a user