api ชื่อโครงการ/กิจกรรม/หลักสูตร
This commit is contained in:
parent
9da7f47cf6
commit
c2af2a3b08
20 changed files with 1819 additions and 57 deletions
154
src/entities/DevelopmentHistory.ts
Normal file
154
src/entities/DevelopmentHistory.ts
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { PosLevel } from "./PosLevel";
|
||||
import { PosType } from "./PosType";
|
||||
import { Development } from "./Development";
|
||||
|
||||
@Entity("developmentHistory")
|
||||
export class DevelopmentHistory extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ยศ",
|
||||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
rank: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "คำนำหน้าชื่อ",
|
||||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
prefix: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อ",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
firstName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "นามสกุล",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
lastName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เลขประจำตัวประชาชน",
|
||||
default: null,
|
||||
length: 13,
|
||||
})
|
||||
citizenId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ตำแหน่ง",
|
||||
default: null,
|
||||
length: 255,
|
||||
})
|
||||
position: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "ไอดีระดับตำแหน่ง",
|
||||
})
|
||||
posLevelId: string | null;
|
||||
|
||||
@ManyToOne(() => PosLevel, (posLevel) => posLevel.developmentHistorys)
|
||||
@JoinColumn({ name: "posLevelId" })
|
||||
posLevel: PosLevel;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "ไอดีประเภทตำแหน่ง",
|
||||
})
|
||||
posTypeId: string | null;
|
||||
|
||||
@ManyToOne(() => PosType, (posType) => posType.developmentHistorys)
|
||||
@JoinColumn({ name: "posTypeId" })
|
||||
posType: PosType;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "โครงการ/หลักสูตรการฝึกอบรม",
|
||||
default: null,
|
||||
})
|
||||
developmentId: string;
|
||||
|
||||
@ManyToOne(() => Development, (development: Development) => development.developmentHistorys)
|
||||
@JoinColumn({ name: "developmentId" })
|
||||
development: Development;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ",
|
||||
default: null,
|
||||
length: 255,
|
||||
})
|
||||
order: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่",
|
||||
default: null,
|
||||
length: 255,
|
||||
})
|
||||
dateOrder: string;
|
||||
}
|
||||
export class CreateDevelopmentHistory {
|
||||
@Column()
|
||||
rank: string | null;
|
||||
@Column()
|
||||
prefix: string | null;
|
||||
@Column()
|
||||
firstName: string | null;
|
||||
@Column()
|
||||
lastName: string | null;
|
||||
@Column()
|
||||
citizenId: string;
|
||||
@Column()
|
||||
position: string | null;
|
||||
@Column()
|
||||
posLevelId: string | null;
|
||||
@Column()
|
||||
posTypeId: string | null;
|
||||
@Column()
|
||||
developmentId: string;
|
||||
@Column()
|
||||
order: string | null;
|
||||
@Column()
|
||||
dateOrder: string | null;
|
||||
}
|
||||
|
||||
export class UpdateDevelopmentHistory {
|
||||
@Column()
|
||||
rank: string | null;
|
||||
@Column()
|
||||
prefix: string | null;
|
||||
@Column()
|
||||
firstName: string | null;
|
||||
@Column()
|
||||
lastName: string | null;
|
||||
@Column()
|
||||
citizenId: string;
|
||||
@Column()
|
||||
position: string | null;
|
||||
@Column()
|
||||
posLevelId: string | null;
|
||||
@Column()
|
||||
posTypeId: string | null;
|
||||
@Column()
|
||||
developmentId: string;
|
||||
@Column()
|
||||
order: string | null;
|
||||
@Column()
|
||||
dateOrder: string | null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue