chore: user financial

This commit is contained in:
Matin
2025-02-15 10:59:53 +03:30
parent caa968ab4a
commit a13f374031
14 changed files with 246 additions and 19 deletions
@@ -0,0 +1,31 @@
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.userFinancials)
user: User;
}