hrms-api-development/src/entities/DevelopmentProjectType.ts

33 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-04-11 11:39:56 +07:00
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;
}