chore: template
This commit is contained in:
@@ -5,6 +5,7 @@ import { Role } from "./role.entity";
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { Business } from "../../businesses/entities/business.entity";
|
||||
import { Domain } from "../../domains/entities/domain.entity";
|
||||
import { Template } from "../../templates/entities/template.entity";
|
||||
import { UserRepository } from "../repositories/user.repository";
|
||||
|
||||
@Entity({ repository: () => UserRepository })
|
||||
@@ -52,11 +53,14 @@ export class User extends BaseEntity {
|
||||
@ManyToOne(() => Role, { deleteRule: "restrict" })
|
||||
role!: Role;
|
||||
|
||||
@ManyToOne(() => Business, { deleteRule: "restrict" })
|
||||
@ManyToOne(() => Business, { deleteRule: "cascade" })
|
||||
business!: Business;
|
||||
|
||||
@ManyToOne(() => Domain, { deleteRule: "restrict" })
|
||||
domain!: Domain;
|
||||
|
||||
@ManyToOne(() => Template, { deleteRule: "restrict", nullable: true })
|
||||
template?: Template;
|
||||
|
||||
[EntityRepositoryType]?: UserRepository;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user