chore: seeder for city and province
This commit is contained in:
@@ -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[];
|
||||
}
|
||||
Reference in New Issue
Block a user