refactor: the whole role and permission flow
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { Column, Entity, ManyToOne, Unique } from "typeorm";
|
||||
|
||||
import { User } from "./user.entity";
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { FinancialType } from "../enums/financial-type.enum";
|
||||
|
||||
@Unique(["user", "type"])
|
||||
@Entity()
|
||||
export class UserFinancial extends BaseEntity {
|
||||
@Column({ type: "enum", enum: FinancialType, default: FinancialType.REAL })
|
||||
type: FinancialType;
|
||||
|
||||
@Column({ nullable: true })
|
||||
economicCode: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
registrationId: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
nationalId: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
number: string;
|
||||
|
||||
@ManyToOne(() => User)
|
||||
user: User;
|
||||
}
|
||||
Reference in New Issue
Block a user