update
This commit is contained in:
@ -1,8 +1,9 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxCustomerPosition, TrxCustomerStatus, TrxCustomerType, TrxIdentityType } from "../types/trx";
|
import { TrxCustomerPosition, TrxCustomerStatus, TrxCustomerType, TrxIdentityType } from "../types/trx";
|
||||||
import { TrxOccupation } from "./trx_occupations";
|
import { TrxOccupation } from "./trx_occupations";
|
||||||
import { TrxCountry } from "./trx_countries";
|
import { TrxCountry } from "./trx_countries";
|
||||||
|
import { TrxMaintenanceGroup } from "./trx_maintenance_groups";
|
||||||
|
|
||||||
@Entity("trx_customers", { schema: "trx" })
|
@Entity("trx_customers", { schema: "trx" })
|
||||||
export class TrxCustomer {
|
export class TrxCustomer {
|
||||||
@ -129,6 +130,10 @@ export class TrxCustomer {
|
|||||||
@JoinTable()
|
@JoinTable()
|
||||||
country: TrxCountry;
|
country: TrxCountry;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxMaintenanceGroup, (group) => group.customer, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
maintenance_group: TrxMaintenanceGroup;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 256,
|
length: 256,
|
||||||
|
|||||||
@ -10,7 +10,7 @@ export class TrxMaintenanceGroup {
|
|||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@OneToMany(() => TrxCustomer, (customer) => customer.id)
|
@OneToMany(() => TrxCustomer, (customer) => customer.maintenance_group)
|
||||||
customer: TrxCustomer[];
|
customer: TrxCustomer[];
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
|
|||||||
Reference in New Issue
Block a user