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, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { City } from "./city.entity";
@Entity()
export class Province {
@PrimaryGeneratedColumn()
id: number;
@Column({ type: "varchar", length: 255 })
name: string;
@OneToMany(() => City, (city) => city.province)
cities: City[];
}