update
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, OneToMany, OneToOne } from "typeorm";
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, OneToMany } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxCompanyAccount } from "./trx_company_accounts";
|
||||
import { TrxCompanyUser } from "./trx_company_users";
|
||||
|
||||
@Entity("trx_companies", { schema: "trx" })
|
||||
export class TrxCompany {
|
||||
@ -51,9 +50,6 @@ export class TrxCompany {
|
||||
@OneToMany(() => TrxCompanyAccount, (company_account) => company_account.company, { cascade: true, nullable: false })
|
||||
company_account: TrxCompanyAccount[];
|
||||
|
||||
@OneToOne(() => TrxCompanyUser, (company_user) => company_user.company, { onDelete: "CASCADE" })
|
||||
user: TrxCompanyUser;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -48,8 +48,8 @@ export class TrxCompanyUser {
|
||||
@OneToMany(() => TrxConfigLevel, (level) => level.id, { onDelete: "NO ACTION", nullable: false })
|
||||
level: TrxConfigLevel[];
|
||||
|
||||
@OneToOne(() => TrxCompany, (company) => company.user, { cascade: true })
|
||||
@JoinColumn()
|
||||
@ManyToOne(() => TrxCompany, { onDelete: "NO ACTION" })
|
||||
@JoinTable()
|
||||
company: TrxCompany;
|
||||
|
||||
@Index()
|
||||
|
||||
Reference in New Issue
Block a user