ปรับโครงาร

This commit is contained in:
Kittapath 2024-04-11 11:39:56 +07:00
parent b8e1c93cb4
commit 4f8b2cec73
10 changed files with 1317 additions and 483 deletions

View 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;
}