เพิ่มตำแหน่งเลือกได้หลายอัน
This commit is contained in:
parent
68c31be431
commit
166c919bbe
10 changed files with 424 additions and 115 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Entity, Column, OneToMany } from "typeorm";
|
||||
import { Entity, Column, OneToMany, ManyToMany, JoinTable } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Development } from "./Development";
|
||||
|
||||
|
|
@ -12,8 +12,9 @@ export class Province extends EntityBase {
|
|||
})
|
||||
name: string;
|
||||
|
||||
@OneToMany(() => Development, (development: Development) => development.province)
|
||||
developments: Development[];
|
||||
@ManyToMany(() => Development, (development) => development.provinces)
|
||||
@JoinTable()
|
||||
developmentProvinces: Development[];
|
||||
|
||||
@OneToMany(() => Development, (development: Development) => development.provinceActual)
|
||||
developmentActuals: Development[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue