ปรับโครงาร
This commit is contained in:
parent
b8e1c93cb4
commit
4f8b2cec73
10 changed files with 1317 additions and 483 deletions
32
src/entities/DevelopmentProjectType.ts
Normal file
32
src/entities/DevelopmentProjectType.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Development } from "./Development";
|
||||
|
||||
@Entity("developmentProjectType")
|
||||
export class DevelopmentProjectType extends EntityBase {
|
||||
@Column({
|
||||
// STRATEGIC_PROJECT = โครงการตามยุทธศาสตร์
|
||||
// MISSION_PROJECT = โครงการตามภารกิจประจำของหน่วยงาน
|
||||
// NEW_PROJECT = โครงการใหม่
|
||||
// ONGOING_PROJECT = โครงการต่อเนื่อง
|
||||
nullable: true,
|
||||
comment: "ประเภทโครงการ",
|
||||
default: null,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "โครงการ/หลักสูตรการฝึกอบรม",
|
||||
default: null,
|
||||
})
|
||||
developmentId: string;
|
||||
|
||||
@ManyToOne(() => Development, (development: Development) => development.developmentProjectTypes)
|
||||
@JoinColumn({ name: "developmentId" })
|
||||
development: Development;
|
||||
}
|
||||
export class CreateDevelopmentProjectType {
|
||||
@Column()
|
||||
name: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue