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