chore: seeder for city and province

This commit is contained in:
Matin
2025-02-17 10:37:58 +03:30
parent 20d6c5b294
commit 7f09e92abb
11 changed files with 137 additions and 8 deletions
@@ -0,0 +1,15 @@
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
import { Province } from "./province.entity";
@Entity()
export class City {
@PrimaryGeneratedColumn()
id: number;
@Column({ type: "varchar", length: 255 })
name: string;
@ManyToOne(() => Province, (province) => province.cities, { nullable: false })
province: Province;
}