update
This commit is contained in:
@ -45,7 +45,7 @@ export class TrxCompanyUser {
|
|||||||
})
|
})
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@OneToMany(() => TrxConfigLevel, (level) => level.id, { onDelete: "NO ACTION" })
|
@OneToMany(() => TrxConfigLevel, (level) => level.company_user, { onDelete: "NO ACTION", nullable: false })
|
||||||
level: TrxConfigLevel[];
|
level: TrxConfigLevel[];
|
||||||
|
|
||||||
@ManyToOne(() => TrxCompany, { onDelete: "NO ACTION" })
|
@ManyToOne(() => TrxCompany, { onDelete: "NO ACTION" })
|
||||||
|
|||||||
@ -1,11 +1,16 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
|
import { TrxCompanyUser } from "./trx_company_users";
|
||||||
|
|
||||||
@Entity("trx_config_levels", { schema: "trx" })
|
@Entity("trx_config_levels", { schema: "trx" })
|
||||||
export class TrxConfigLevel {
|
export class TrxConfigLevel {
|
||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxCompanyUser, (company) => company.level, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
company_user: TrxCompanyUser;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 256,
|
length: 256,
|
||||||
|
|||||||
Reference in New Issue
Block a user