api ชื่อโครงการ/กิจกรรม/หลักสูตร

This commit is contained in:
Kittapath 2024-04-03 00:55:40 +07:00
parent 9da7f47cf6
commit c2af2a3b08
20 changed files with 1819 additions and 57 deletions

27
src/entities/Province.ts Normal file
View 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>;