chore: discount module

This commit is contained in:
Matin
2025-02-16 16:30:17 +03:30
parent 6785b3e9d0
commit 20d6c5b294
31 changed files with 1752 additions and 141 deletions
@@ -0,0 +1,24 @@
import { Column, Entity, JoinColumn, OneToOne, Unique } from "typeorm";
import { User } from "./user.entity";
import { BaseEntity } from "../../../common/entities/base.entity";
@Unique(["user"])
@Entity()
export class LegalUser extends BaseEntity {
@Column({ nullable: true })
economicCode: string;
@Column({ nullable: true })
registrationId: string;
@Column({ nullable: true })
nationalId: string;
@Column({ nullable: true })
number: string;
@OneToOne(() => User, (user) => user.legalUser, { onDelete: "CASCADE" })
@JoinColumn()
user: User;
}