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