refactor: the whole role and permission flow

This commit is contained in:
mahyargdz
2025-02-17 13:54:34 +03:30
parent ad673613d9
commit 763b6b49d9
42 changed files with 479 additions and 387 deletions
@@ -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;
}