From 34902c15d53c17bba9e0d973151ce08deebcdd1f Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Thu, 4 Apr 2024 14:17:19 +0700 Subject: [PATCH] devscholarship entity --- src/entities/DevelopmentScholarship.ts | 387 +++++++++++++++++++++++++ 1 file changed, 387 insertions(+) create mode 100644 src/entities/DevelopmentScholarship.ts diff --git a/src/entities/DevelopmentScholarship.ts b/src/entities/DevelopmentScholarship.ts new file mode 100644 index 0000000..29700e2 --- /dev/null +++ b/src/entities/DevelopmentScholarship.ts @@ -0,0 +1,387 @@ +import { Entity, Column, ManyToOne, JoinColumn, Double } from "typeorm"; +import { EntityBase } from "./base/Base"; + +@Entity("developmentScholarship") +export class DevelopmentScholarship 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, + comment: "ชื่อตำแหน่งทางการบริหาร", + length: 255, + default: null, + }) + posExecutive: string; + + @Column({ + nullable: true, + comment: "ยศ(ผู้ค้ำ)", + length: 40, + default: null, + }) + guarantorRank: string; + + @Column({ + nullable: true, + comment: "คำนำหน้าชื่อ(ผู้ค้ำ)", + length: 40, + default: null, + }) + guarantorPrefix: string; + + @Column({ + nullable: true, + comment: "ชื่อ(ผู้ค้ำ)", + length: 255, + default: null, + }) + guarantorFirstName: string; + + @Column({ + nullable: true, + comment: "นามสกุล(ผู้ค้ำ)", + length: 255, + default: null, + }) + guarantorLastName: string; + + @Column({ + nullable: true, + comment: "เลขประจำตัวประชาชน(ผู้ค้ำ)", + default: null, + length: 13, + }) + guarantorCitizenId: string; + + @Column({ + nullable: true, + comment: "ตำแหน่ง(ผู้ค้ำ)", + default: null, + length: 255, + }) + guarantorPosition: string; + + @Column({ + nullable: true, + comment: "ชื่อตำแหน่งทางการบริหาร(ผู้ค้ำ)", + length: 255, + default: null, + }) + guarantorPosExecutive: string; + + @Column({ + nullable: true, + comment: "ปีงบประมาณที่ได้รับทุน", + }) + scholarshipYear: number; + + @Column({ + //แหล่งงบประมาณกทม = BKK , แหล่งงบประมาณอื่นๆ = OTHER + nullable: true, + comment: "แหล่งงบประมาณ", + length: 10, + default: null, + }) + budgetSource: string; + + @Column({ + comment: "งบประมาณที่ได้รับอนุมัติตลอดหลักสูตร", + default: 0, + nullable: true, + type: "double", + }) + budgetApprove: Double; + + @Column({ + nullable: true, + comment: "เลขที่หนังสืออนุมัติ", + length: 40, + default: null, + }) + bookNo: string; + + @Column({ + nullable: true, + type: "date", + comment: "ลงวันที่(หนังสือ)", + default: null, + }) + bookNoDate: Date; + + @Column({ + nullable: true, + type: "date", + comment: "หนังสืออนุมัติเมื่อวันที่", + default: null, + }) + bookApproveDate: Date; + + @Column({ + comment: "ใช้เวลาราชการ", + default: false, + }) + useOfficialTime: boolean; + + @Column({ + nullable: true, + comment: "เปลี่ยนแปลงรายละเอียด", + type: "text", + default: null, + }) + changeDetail: string; + + @Column({ + //การศึกษาในประเทศ = DOMESTICE , + //ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ) = NOABROAD + //ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ) = ABROAD + //ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร) = EXECUTIVE + nullable: true, + comment: "เลือกประเภททุน", + length: 40, + default: null, + }) + scholarshipType: string; + + @Column({ + //ทุน 1 (ก)(ข)(ค) = FUND1 , ทุน 2 (ก)(ข) = FUND2 + nullable: true, + comment: "ประเภททุน", + length: 40, + default: null, + }) + fundType: string; + + @Column({ + nullable: true, + comment: "เลขที่สัญญา", + length: 40, + default: null, + }) + contractNo: string; + + @Column({ + nullable: true, + type: "date", + comment: "ลงวันที่(เลขที่สัญญา)", + default: null, + }) + contractDate: Date; + + @Column({ + nullable: true, + comment: "เลขที่หนังสือรายงานตัวกลับ", + length: 40, + default: null, + }) + reportBackNo: string; + + @Column({ + nullable: true, + type: "date", + comment: "ลงวันที่(เลขที่หนังสือรายงานตัวกลับ)", + default: null, + }) + reportBackNoDate: Date; + + @Column({ + nullable: true, + type: "date", + comment: "รายงานตัวกลับวันที่", + default: null, + }) + reportBackDate: Date; + + //เพิ่มต่อจากนี้ + + @Column({ + nullable: true, + comment: "หลักสูตรการฝึกอบรม", + length: 255, + default: null, + }) + trainingCourseName: string; + + @Column({ + nullable: true, + comment: "สถาบันการศึกษา/หน่วยงานผู้จัดการฝึกอบรม", + length: 255, + default: null, + }) + trainingplaceName: string; + + @Column({ + nullable: true, + type: "date", + comment: "วันที่เริ่มต้นการฝึกอบรม", + default: null, + }) + trainingStartDate: Date; + + @Column({ + nullable: true, + type: "date", + comment: "วันที่สิ้นสุดการฝึกอบรม", + default: null, + }) + trainingEndDate: Date; + + @Column({ + nullable: true, + type: "datetime", + comment: "สถานที่ศึกษาดูงาน", + default: null, + }) + studyTourPlace: Date; + + @Column({ + nullable: true, + type: "datetime", + comment: "หัวข้อไปศึกษาดูงาน", + default: null, + }) + studyTourTopic: Date; + + @Column({ + nullable: true, + comment: "เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ", + default: null, + length: 255, + }) + order: string; + + @Column({ + nullable: true, + type: "datetime", + comment: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่", + default: null, + }) + dateOrder: Date; +} +export class CreateDevelopmentHistory { + rank: string | null; + prefix: string | null; + firstName: string | null; + lastName: string | null; + citizenId: string | null; + position: string | null; + posExecutive: string | null; + guarantorType: string | null; + guarantorRank: string | null; + guarantorPrefix: string | null; + guarantorFirstName: string | null; + guarantorLastName: string | null; + guarantorCitizenId: string | null; + guarantorPosition: string | null; + guarantorPosExecutive: string | null; + scholarshipYear: number | null; + budgetSource: string | null; + budgetApprove: Double | null; + bookNo: string | null; + bookDate: Date | null; + bookApproveDate: Date | null; + useOfficialTime: boolean | null; + changeDetail: string | null; + scholarshipType: string | null; + fundType: string | null; + contractNo: string | null; + contractDate: Date | null; + reportBackNo: string | null; + reportBackNoDate: Date | null; + reportBackDate: Date | null; + trainingCourseName: string | null; + trainingplaceName: string | null; + trainingStartDate: Date | null; + trainingEndtDate: Date | null; + order: string | null; + dateOrder: Date | null; + studyTourPlace: Date | null; + studyTourTopic: Date | null; +} + +export class UpdateDevelopmentHistory { + rank: string | null; + prefix: string | null; + firstName: string | null; + lastName: string | null; + citizenId: string | null; + position: string | null; + posExecutive: string | null; + guarantorType: string | null; + guarantorRank: string | null; + guarantorPrefix: string | null; + guarantorFirstName: string | null; + guarantorLastName: string | null; + guarantorCitizenId: string | null; + guarantorPosition: string | null; + guarantorPosExecutive: string | null; + scholarshipYear: number | null; + budgetSource: string | null; + budgetApprove: Double | null; + bookNo: string | null; + bookDate: Date | null; + bookApproveDate: Date | null; + useOfficialTime: boolean | null; + changeDetail: string | null; + scholarshipType: string | null; + fundType: string | null; + contractNo: string | null; + contractDate: Date | null; + reportBackNo: string | null; + reportBackNoDate: Date | null; + reportBackDate: Date | null; + trainingCourseName: string | null; + trainingplaceName: string | null; + trainingStartDate: Date | null; + trainingEndtDate: Date | null; + order: string | null; + dateOrder: Date | null; + studyTourPlace: Date | null; + studyTourTopic: Date | null; +}