chore: create legal and real user data info

This commit is contained in:
Matin
2025-02-17 15:43:12 +03:30
parent 14373bb665
commit 8b8ddb693e
18 changed files with 390 additions and 20 deletions
+5 -1
View File
@@ -1,5 +1,6 @@
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
import { Column, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { Address } from "./address.entity";
import { Province } from "./province.entity";
@Entity()
@@ -10,6 +11,9 @@ export class City {
@Column({ type: "varchar", length: 255 })
name: string;
@OneToMany(() => Address, (address) => address.city)
addresses: Address[];
@ManyToOne(() => Province, (province) => province.cities, { nullable: false })
province: Province;
}