api ชื่อโครงการ/กิจกรรม/หลักสูตร
This commit is contained in:
parent
9da7f47cf6
commit
c2af2a3b08
20 changed files with 1819 additions and 57 deletions
27
src/entities/Province.ts
Normal file
27
src/entities/Province.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { Entity, Column, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Development } from "./Development";
|
||||
|
||||
@Entity("province")
|
||||
export class Province extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "จังหวัด",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@OneToMany(() => Development, (development: Development) => development.province)
|
||||
developments: Development[];
|
||||
|
||||
@OneToMany(() => Development, (development: Development) => development.provinceActual)
|
||||
developmentActuals: Development[];
|
||||
}
|
||||
|
||||
export class CreateProvince {
|
||||
@Column()
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type UpdateProvince = Partial<CreateProvince>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue