first
This commit is contained in:
commit
925c5d1ab2
60 changed files with 18843 additions and 0 deletions
40
src/entities/Assessment.ts
Normal file
40
src/entities/Assessment.ts
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Evaluation } from "./Evaluation";
|
||||
|
||||
@Entity("assessment")
|
||||
export class Assessment extends EntityBase {
|
||||
@Column({
|
||||
comment: "Id การทำรายการระบบประเมิน",
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
evaluationId: string;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "วันที่ได้รับ" })
|
||||
date: Date;
|
||||
|
||||
@Column({ nullable: true, type: "double precision", comment: "ส่วนที่1 (คะแนน)" })
|
||||
point1Total: number;
|
||||
|
||||
@Column({ nullable: true, type: "double precision", comment: "ผลประเมินส่วนที่2 (คะแนน)" })
|
||||
point1: number;
|
||||
|
||||
@Column({ nullable: true, type: "double precision", comment: "ส่วนที่2 (คะแนน)" })
|
||||
point2Total: number;
|
||||
|
||||
@Column({ nullable: true, type: "double precision", comment: "ผลประเมินส่วนที่2 (คะแนน)" })
|
||||
point2: number;
|
||||
|
||||
@Column({ nullable: true, type: "double precision", comment: "ผลรวม (คะแนน)" })
|
||||
pointSumTotal: number;
|
||||
|
||||
@Column({ nullable: true, type: "double precision", comment: "ผลประเมินรวม (คะแนน)" })
|
||||
pointSum: number;
|
||||
|
||||
@ManyToOne(() => Evaluation, (Evaluation) => Evaluation.assessment)
|
||||
@JoinColumn({ name: "evaluationId" })
|
||||
evaluation: Evaluation;
|
||||
}
|
||||
|
||||
export type UpdateAssessment = Partial<Assessment>;
|
||||
37
src/entities/Certificate.ts
Normal file
37
src/entities/Certificate.ts
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Evaluation } from "./Evaluation";
|
||||
|
||||
@Entity("certificate")
|
||||
export class Certificate extends EntityBase {
|
||||
@Column({
|
||||
comment: "Id การทำรายการระบบประเมิน",
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
evaluationId: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อสถานะการประเมิน" })
|
||||
statictep: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อใบอนุญาต" })
|
||||
certificateType: string;
|
||||
|
||||
@Column({ nullable: true, comment: "หน่วยงานผู้ออกใบอนุญาต" })
|
||||
issuer: string;
|
||||
|
||||
@Column({ nullable: true, comment: "เลขที่ใบอนุญาต" })
|
||||
certificateNo: string;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "วันที่ออกใบอนุญาต" })
|
||||
issueDate: Date;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "วันที่หมดอายุ" })
|
||||
expireDate: Date;
|
||||
|
||||
@ManyToOne(() => Evaluation, (Evaluation) => Evaluation.certificate)
|
||||
@JoinColumn({ name: "evaluationId" })
|
||||
evaluation: Evaluation;
|
||||
}
|
||||
|
||||
export type UpdateCertificate = Partial<Certificate>;
|
||||
51
src/entities/Director.ts
Normal file
51
src/entities/Director.ts
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
import {
|
||||
Entity,
|
||||
Column,
|
||||
ManyToMany,
|
||||
} from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Evaluation } from "./Evaluation";
|
||||
@Entity("director")
|
||||
export class Director extends EntityBase {
|
||||
@Column({ nullable: true, comment: "คำนำหน้าชื่อ" })
|
||||
prefix: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อ" })
|
||||
firstName: string;
|
||||
|
||||
@Column({ nullable: true, comment: "นามสกุล" })
|
||||
lastName: string;
|
||||
|
||||
@Column({ nullable: true, comment: "เบอร์โทรศัพท์" })
|
||||
phone: string;
|
||||
|
||||
@Column({ nullable: true, comment: "อีเมล" })
|
||||
email: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ตำแหน่ง" })
|
||||
position: string;
|
||||
|
||||
@ManyToMany(() => Evaluation, (evaluation) => evaluation.directors)
|
||||
evaluations: Evaluation[];
|
||||
}
|
||||
|
||||
export class CreateDirector {
|
||||
@Column()
|
||||
prefix: string;
|
||||
|
||||
@Column()
|
||||
firstName: string;
|
||||
|
||||
@Column()
|
||||
lastName: string;
|
||||
|
||||
@Column()
|
||||
phone: string;
|
||||
|
||||
@Column()
|
||||
email: string;
|
||||
|
||||
@Column()
|
||||
position: string;
|
||||
}
|
||||
export type UpdateDirector = Partial<Director>;
|
||||
64
src/entities/Education.ts
Normal file
64
src/entities/Education.ts
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Evaluation } from "./Evaluation";
|
||||
|
||||
@Entity("education")
|
||||
export class Education extends EntityBase {
|
||||
@Column({
|
||||
comment: "Id การทำรายการระบบประเมิน",
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
evaluationId: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ระดับศึกษา" })
|
||||
educationLevel: string;
|
||||
|
||||
@Column({ nullable: true, comment: "สถานศึกษา" })
|
||||
institute: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ประเภทช่วงเวลาการศึกษา" })
|
||||
isDate: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "ตั้งแต่" })
|
||||
startDate: Date;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "EndDate" })
|
||||
endDate: Date;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "วันที่สำเร็จการศึกษา" })
|
||||
finishDate: Date;
|
||||
|
||||
@Column({ nullable: true, comment: "เป็นวุฒิศึกษาในตำแหน่ง" })
|
||||
isEducation: boolean;
|
||||
|
||||
@Column({ nullable: true, comment: "วุฒิการศึกษา" })
|
||||
degree: string;
|
||||
|
||||
@Column({ nullable: true, comment: "สาขาวิชา/ทาง" })
|
||||
field: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ทุน" })
|
||||
fundName: string;
|
||||
|
||||
@Column({ nullable: true, comment: "เกรดเฉลี่ย" })
|
||||
gpa: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ประเทศ" })
|
||||
country: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ข้อมูลการติดต่อ" })
|
||||
other: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ระยะเวลา" })
|
||||
duration: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ระยะเวลาหลักสูตร" })
|
||||
durationYear: string;
|
||||
|
||||
@ManyToOne(() => Evaluation, (Evaluation) => Evaluation.education)
|
||||
@JoinColumn({ name: "evaluationId" })
|
||||
evaluation: Evaluation;
|
||||
}
|
||||
|
||||
export type UpdateEducation = Partial<Education>;
|
||||
476
src/entities/Evaluation.ts
Normal file
476
src/entities/Evaluation.ts
Normal file
|
|
@ -0,0 +1,476 @@
|
|||
import { Entity, Column, OneToMany, ManyToMany, JoinTable } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EvaluationLogs } from "./EvaluationLogs";
|
||||
import { Education } from "./Education";
|
||||
import { Certificate } from "./Certificate";
|
||||
import { Salary } from "./Salary";
|
||||
import { Training } from "./Training";
|
||||
import { Assessment } from "./Assessment";
|
||||
import { Director } from "./Director";
|
||||
import { Meeting } from "./Meeting";
|
||||
|
||||
@Entity("evaluation")
|
||||
export class Evaluation extends EntityBase {
|
||||
@Column({
|
||||
comment: "Id ชื่อผู้ใช้งาน",
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
userId: string;
|
||||
|
||||
@Column({ nullable: true, comment: "รหัสบัตรประชาชน", length: 13 })
|
||||
citizenId: string;
|
||||
|
||||
@Column({ nullable: true, comment: "คำนำหน้า" })
|
||||
prefix: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อ นามสกุล" })
|
||||
fullName: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ตำแหน่ง" })
|
||||
position: string;
|
||||
|
||||
@Column({ nullable: true, comment: "สังกัด" })
|
||||
oc: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "root",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
rootId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "child1",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
child1Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "child2",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
child2Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "child3",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
child3Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "child4",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
child4Id: string;
|
||||
|
||||
@Column({ nullable: true, comment: "เงินเดือนปัจจุบัน" })
|
||||
salary: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ระดับปัจจุบัน" })
|
||||
positionLevel: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ตำแหน่งเลขที่" })
|
||||
posNo: string;
|
||||
|
||||
@Column({ nullable: true, comment: "วันเดือนปีเกิด" })
|
||||
birthDate: string;
|
||||
|
||||
@Column({ nullable: true, comment: "อายุราชการ" })
|
||||
govAge: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ประเภทแบบประเมิน" })
|
||||
type: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อสถานะการประเมิน" })
|
||||
step: string;
|
||||
|
||||
@Column({ comment: "มีคุณวุฒิการศึกษา", default: false })
|
||||
isEducationalQft: boolean;
|
||||
|
||||
@Column({ comment: "มีประวัติการรับราชการ", default: false })
|
||||
isGovermantServiceHtr: boolean;
|
||||
|
||||
@Column({ comment: "มีประสบการณ์ในการปฏิบัติงาน", default: false })
|
||||
isOperatingExp: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งในสายงานที่ขอเข้ารับการคัดเลือก",
|
||||
default: false,
|
||||
})
|
||||
isMinPeriodOfTenure: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "มีคุณสมบัติตรงตามคุณสมบัติเฉพาะสำหรับตำแหน่งที่กำหนด ในมาตราฐานกำหนดตำแหน่ง",
|
||||
default: false,
|
||||
})
|
||||
isHaveSpecificQft: boolean;
|
||||
|
||||
@Column({
|
||||
comment:
|
||||
"มีใบอนุญาตประกอบวิชาชีพของสายงานต่างๆ และ/หรือ คุณวุฒิเพิ่มเติมครบถ้วนตามที่ ก.ก. กำหนด (แพทย์พยาบาล วิศวกรโยธา สถาปนิก ฯลฯ)",
|
||||
default: false,
|
||||
})
|
||||
isHaveProLicense: boolean;
|
||||
|
||||
@Column({
|
||||
comment:
|
||||
"มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคยดำรงตำแหน่งในสายงานที่จะคัดเลือกตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก",
|
||||
default: false,
|
||||
})
|
||||
isHaveMinPeriodOrHoldPos: boolean;
|
||||
|
||||
@Column({ nullable: true, comment: "เหตุผล" })
|
||||
reason: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ประสบการณ์ในการปฏิบัติงาน" })
|
||||
experience: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อ-นามสกุล ผู้บังคับบัญชาชั้นต้น" })
|
||||
commanderFullname: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ตำแหน่ง ผู้บังคับบัญชาชั้นต้น" })
|
||||
commanderPosition: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อ-นามสกุล ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ" })
|
||||
commanderAboveFullname: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ตำแหน่ง ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ" })
|
||||
commanderAbovePosition: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อ-นามสกุล ผู้บังคับบัญชาชั้นต้น (จัดเตรียมเอกสารเล่ม 2)" })
|
||||
commanderFullnameDoc2: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ตำแหน่ง ผู้บังคับบัญชาชั้นต้น (จัดเตรียมเอกสารเล่ม 2)" })
|
||||
commanderPositionDoc2: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อ-นามสกุล ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ (จัดเตรียมเอกสารเล่ม 2)",
|
||||
})
|
||||
commanderAboveFullnameDoc2: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ตำแหน่ง ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ (จัดเตรียมเอกสารเล่ม 2)",
|
||||
})
|
||||
commanderAbovePositionDoc2: string;
|
||||
|
||||
@Column({ nullable: true, comment: "วันที่ประกาศบนเว็บไซต์" })
|
||||
dateAnnounce: Date;
|
||||
|
||||
@Column({ nullable: true, comment: "วันที่จัดเตรียมเอกสารเล่ม 2" })
|
||||
datePrepareDoc2: Date;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อเจ้าของผลงาน" })
|
||||
author: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อผลงาน" })
|
||||
subject: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อเจ้าของผลงาน2" })
|
||||
authorDoc2: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อผลงาน2" })
|
||||
subjectDoc2: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ตำแหน่งที่ได้รับมอบหมาย" })
|
||||
assignedPosition: string;
|
||||
|
||||
@OneToMany(() => EvaluationLogs, (evaluationLogs) => evaluationLogs.evaluation)
|
||||
evaluationLogs: EvaluationLogs[];
|
||||
|
||||
@OneToMany(() => Education, (education) => education.evaluation)
|
||||
education: Education[];
|
||||
|
||||
@OneToMany(() => Certificate, (certificate) => certificate.evaluation)
|
||||
certificate: Certificate[];
|
||||
|
||||
@OneToMany(() => Salary, (salary) => salary.evaluation)
|
||||
salaries: Salary[];
|
||||
|
||||
@OneToMany(() => Training, (training) => training.evaluation)
|
||||
training: Training[];
|
||||
|
||||
@OneToMany(() => Assessment, (assessment) => assessment.evaluation)
|
||||
assessment: Assessment[];
|
||||
|
||||
@ManyToMany(() => Director, (director) => director.evaluations)
|
||||
@JoinTable()
|
||||
directors: Director[];
|
||||
|
||||
@ManyToMany(() => Meeting, (meeting) => meeting.evaluations)
|
||||
@JoinTable()
|
||||
meetings: Meeting[];
|
||||
}
|
||||
|
||||
export class CreateEvaluation {
|
||||
@Column()
|
||||
userId?: string;
|
||||
|
||||
@Column()
|
||||
citizenId?: string;
|
||||
|
||||
@Column()
|
||||
prefix?: string;
|
||||
|
||||
@Column()
|
||||
fullName: string;
|
||||
|
||||
@Column()
|
||||
position?: string | null;
|
||||
|
||||
@Column()
|
||||
oc?: string | null;
|
||||
|
||||
@Column()
|
||||
salary?: string | null;
|
||||
|
||||
@Column()
|
||||
positionLevel?: string | null;
|
||||
|
||||
@Column()
|
||||
posNo?: string | null;
|
||||
|
||||
@Column()
|
||||
birthDate?: string | null;
|
||||
|
||||
@Column()
|
||||
govAge?: string | null;
|
||||
|
||||
@Column()
|
||||
type?: string | null;
|
||||
|
||||
@Column()
|
||||
step?: string | null;
|
||||
|
||||
@Column()
|
||||
isEducationalQft: boolean; //ReqField
|
||||
|
||||
@Column()
|
||||
isGovermantServiceHtr: boolean; //ReqField
|
||||
|
||||
@Column()
|
||||
isOperatingExp: boolean; //ReqField
|
||||
|
||||
@Column()
|
||||
isMinPeriodOfTenure: boolean; //ReqField
|
||||
|
||||
@Column()
|
||||
isHaveSpecificQft: boolean; //ReqField
|
||||
|
||||
@Column()
|
||||
isHaveProLicense: boolean; //ReqField
|
||||
|
||||
@Column()
|
||||
isHaveMinPeriodOrHoldPos: boolean; //ReqField
|
||||
|
||||
@Column()
|
||||
reason?: string | null;
|
||||
|
||||
@Column()
|
||||
educations?: CreateEducation[];
|
||||
|
||||
@Column()
|
||||
certificates?: CreateCertificate[];
|
||||
|
||||
@Column()
|
||||
salaries?: CreateSalary[];
|
||||
|
||||
@Column()
|
||||
trainings?: CreateTraining[];
|
||||
|
||||
@Column()
|
||||
assessments?: CreateAssessment[];
|
||||
}
|
||||
|
||||
export class CreateEducation {
|
||||
@Column()
|
||||
educationLevel?: string | null;
|
||||
|
||||
@Column()
|
||||
institute?: string | null;
|
||||
|
||||
@Column()
|
||||
isDate?: boolean | null;
|
||||
|
||||
@Column()
|
||||
startDate?: Date | null;
|
||||
|
||||
@Column()
|
||||
endDate?: Date | null;
|
||||
|
||||
@Column()
|
||||
finishDate?: Date | null;
|
||||
|
||||
@Column()
|
||||
isEducation?: boolean | null;
|
||||
|
||||
@Column()
|
||||
degree?: string | null;
|
||||
|
||||
@Column()
|
||||
field?: string | null;
|
||||
|
||||
@Column()
|
||||
fundName?: string | null;
|
||||
|
||||
@Column()
|
||||
gpa?: string | null;
|
||||
|
||||
@Column()
|
||||
country?: string | null;
|
||||
|
||||
@Column()
|
||||
other?: string | null;
|
||||
|
||||
@Column()
|
||||
duration?: string | null;
|
||||
|
||||
@Column()
|
||||
durationYear?: string | null;
|
||||
}
|
||||
|
||||
export class CreateCertificate {
|
||||
@Column()
|
||||
step?: string | null;
|
||||
|
||||
@Column()
|
||||
certificateType?: string | null;
|
||||
|
||||
@Column()
|
||||
issuer?: string | null;
|
||||
|
||||
@Column()
|
||||
certificateNo?: string | null;
|
||||
|
||||
@Column()
|
||||
issueDate?: Date | null;
|
||||
|
||||
@Column()
|
||||
expireDate?: Date | null;
|
||||
}
|
||||
|
||||
export class CreateSalary {
|
||||
@Column()
|
||||
step?: string | null;
|
||||
|
||||
@Column()
|
||||
date?: Date | null;
|
||||
|
||||
@Column()
|
||||
amount?: number | null;
|
||||
|
||||
@Column()
|
||||
positionSalaryAmount?: number | null;
|
||||
|
||||
@Column()
|
||||
mouthSalaryAmount?: number | null;
|
||||
|
||||
@Column()
|
||||
position?: string | null;
|
||||
|
||||
@Column()
|
||||
posNo?: string | null;
|
||||
|
||||
@Column()
|
||||
salaryClass?: string | null;
|
||||
|
||||
@Column()
|
||||
salaryRef?: string | null;
|
||||
|
||||
@Column()
|
||||
refCommandNo?: string | null;
|
||||
|
||||
@Column()
|
||||
refCommandDate?: Date | null;
|
||||
|
||||
@Column()
|
||||
salaryStatus?: string | null;
|
||||
}
|
||||
export class CreateTraining {
|
||||
@Column()
|
||||
name?: string | null;
|
||||
|
||||
@Column()
|
||||
topic?: string | null;
|
||||
|
||||
@Column()
|
||||
startDate?: Date | null;
|
||||
|
||||
@Column()
|
||||
endDate?: Date | null;
|
||||
|
||||
@Column()
|
||||
yearly?: number | null;
|
||||
|
||||
@Column()
|
||||
place?: string | null;
|
||||
|
||||
@Column()
|
||||
duration?: string | null;
|
||||
|
||||
@Column()
|
||||
department?: string | null;
|
||||
|
||||
@Column()
|
||||
numberOrder?: string | null;
|
||||
|
||||
@Column()
|
||||
dateOrder?: Date | null;
|
||||
}
|
||||
export class CreateAssessment {
|
||||
@Column()
|
||||
date?: Date | null;
|
||||
|
||||
@Column()
|
||||
point1Total?: number | null;
|
||||
|
||||
@Column()
|
||||
point1?: number | null;
|
||||
|
||||
@Column()
|
||||
point2Total?: number | null;
|
||||
|
||||
@Column()
|
||||
point2?: number | null;
|
||||
|
||||
@Column()
|
||||
pointSumTotal?: number | null;
|
||||
|
||||
@Column()
|
||||
pointSum?: number | null;
|
||||
}
|
||||
export class CreateEvaluationExpertise {
|
||||
@Column()
|
||||
author?: string | null;
|
||||
|
||||
@Column()
|
||||
subject?: string | null;
|
||||
|
||||
@Column()
|
||||
commanderFullname?: string | null;
|
||||
|
||||
@Column()
|
||||
commanderPosition?: string | null;
|
||||
|
||||
@Column()
|
||||
commanderAboveFullname?: string | null;
|
||||
|
||||
@Column()
|
||||
commanderAbovePosition?: string | null;
|
||||
|
||||
@Column()
|
||||
oc?: string | null;
|
||||
}
|
||||
|
||||
export type UpdateEvaluation = Partial<Evaluation>;
|
||||
22
src/entities/EvaluationLogs.ts
Normal file
22
src/entities/EvaluationLogs.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Evaluation } from "./Evaluation";
|
||||
|
||||
@Entity("evaluationlogs")
|
||||
export class EvaluationLogs extends EntityBase {
|
||||
@Column({
|
||||
comment: "Id การทำรายการระบบประเมิน",
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
evaluationId: string;
|
||||
|
||||
@Column({ comment: "ชื่อสถานะการประเมิน", default: "string" })
|
||||
step: string;
|
||||
|
||||
@ManyToOne(() => Evaluation, (Evaluation) => Evaluation.evaluationLogs)
|
||||
@JoinColumn({ name: "evaluationId" })
|
||||
evaluation: Evaluation;
|
||||
}
|
||||
|
||||
export type UpdateEvaluationLogs = Partial<EvaluationLogs>;
|
||||
51
src/entities/Meeting.ts
Normal file
51
src/entities/Meeting.ts
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
import {
|
||||
Entity,
|
||||
Column,
|
||||
ManyToMany,
|
||||
} from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Evaluation } from "./Evaluation";
|
||||
@Entity("meeting")
|
||||
export class Meeting extends EntityBase {
|
||||
@Column({ nullable: true, comment: "ชื่อการประชุม" })
|
||||
title: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ครั้งที่" })
|
||||
round: string;
|
||||
|
||||
@Column({ nullable: true, comment: "วันเวลาเริ่มในการประชุม" })
|
||||
dateStart: Date;
|
||||
|
||||
@Column({ nullable: true, comment: "วันเวลาสิ้นสุดในการประชุม" })
|
||||
dateEnd: Date;
|
||||
|
||||
@Column({ nullable: true, comment: "ผลการพิจารณาของคณะกรรมการประเมินผลงานแต่ละคณะ" })
|
||||
result: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ระยะเวลาในการแก้ไขผลงาน" })
|
||||
duration: string;
|
||||
|
||||
@ManyToMany(() => Evaluation, (evaluation) => evaluation.meetings)
|
||||
evaluations: Evaluation[];
|
||||
}
|
||||
|
||||
export class CreateMeeting {
|
||||
@Column()
|
||||
title: string;
|
||||
|
||||
@Column()
|
||||
round: string;
|
||||
|
||||
@Column()
|
||||
dateStart: Date;
|
||||
|
||||
@Column()
|
||||
dateEnd: Date;
|
||||
|
||||
@Column()
|
||||
result: string;
|
||||
|
||||
@Column()
|
||||
duration: string;
|
||||
}
|
||||
export type UpdateMeeting = Partial<Meeting>;
|
||||
52
src/entities/Salary.ts
Normal file
52
src/entities/Salary.ts
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Evaluation } from "./Evaluation";
|
||||
|
||||
@Entity("salary")
|
||||
export class Salary extends EntityBase {
|
||||
@Column({
|
||||
comment: "Id การทำรายการระบบประเมิน",
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
evaluationId: string;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "วัน เดือน ปี รับตำแหน่ง" })
|
||||
date: Date;
|
||||
|
||||
@Column({ nullable: true, type: "double precision", comment: "เงินเดือน" })
|
||||
amount: number;
|
||||
|
||||
@Column({ nullable: true, type: "double precision", comment: "เงินประจำตำแหน่ง" })
|
||||
positionSalaryAmount: number;
|
||||
|
||||
@Column({ nullable: true, type: "double precision", comment: "เงินค่าตอบแทนรายเดือน" })
|
||||
mouthSalaryAmount: number;
|
||||
|
||||
@Column({ nullable: true, comment: "ตำแหน่ง" })
|
||||
position: string;
|
||||
|
||||
@Column({ nullable: true, comment: "เลขที่ตำแหน่ง" })
|
||||
posNo: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ตำแหน่ง (รายละเอียด)" })
|
||||
salaryClass: string;
|
||||
|
||||
@Column({ nullable: true, comment: "เอกสารอ้างอิง" })
|
||||
salaryRef: string;
|
||||
|
||||
@Column({ nullable: true, comment: "เอกสารอ้างอิง (เลขที่คำสั่ง)" })
|
||||
refCommandNo: string;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "เอกสารอ้างอิง (ลงวันที่)" })
|
||||
refCommandDate: Date;
|
||||
|
||||
@Column({ nullable: true, comment: "ประเภทตำแหน่งกรณีพิเศษ" })
|
||||
salaryStatus: string;
|
||||
|
||||
@ManyToOne(() => Evaluation, (Evaluation) => Evaluation.salaries)
|
||||
@JoinColumn({ name: "evaluationId" })
|
||||
evaluation: Evaluation;
|
||||
}
|
||||
|
||||
export type UpdateSalary = Partial<Salary>;
|
||||
49
src/entities/Training.ts
Normal file
49
src/entities/Training.ts
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Evaluation } from "./Evaluation";
|
||||
|
||||
@Entity("training")
|
||||
export class Training extends EntityBase {
|
||||
@Column({
|
||||
comment: "Id การทำรายการระบบประเมิน",
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
evaluationId: string;
|
||||
|
||||
@Column({ nullable: true, comment: "ชื่อโครงการ/หลักสูตรการฝึกอบรม" })
|
||||
name: string;
|
||||
|
||||
@Column({ nullable: true, comment: "หัวข้อการฝึกอบรม/ดูงาน" })
|
||||
topic: string;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "วันเริ่มต้นการฝึกอบรม/ดูงาน" })
|
||||
startDate: Date;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "วันสิ้นสุดการฝึกอบรม/ดูงาน" })
|
||||
endDate: Date;
|
||||
|
||||
@Column({ nullable: true, comment: "ปีที่อบรม (พ.ศ.)" })
|
||||
yearly: number;
|
||||
|
||||
@Column({ nullable: true, comment: "สถานที่ฝึกอบรม/ดูงาน" })
|
||||
place: string;
|
||||
|
||||
@Column({ nullable: true, comment: "รวมระยะเวลาในการฝึกอบรม/ดูงาน" })
|
||||
duration: string;
|
||||
|
||||
@Column({ nullable: true, comment: "หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน" })
|
||||
department: string;
|
||||
|
||||
@Column({ nullable: true, comment: "เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ" })
|
||||
numberOrder: string;
|
||||
|
||||
@Column({ nullable: true, type: "datetime", comment: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่" })
|
||||
dateOrder: Date;
|
||||
|
||||
@ManyToOne(() => Evaluation, (Evaluation) => Evaluation.training)
|
||||
@JoinColumn({ name: "evaluationId" })
|
||||
evaluation: Evaluation;
|
||||
}
|
||||
|
||||
export type UpdateTraining = Partial<Training>;
|
||||
39
src/entities/base/Base.ts
Normal file
39
src/entities/base/Base.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
} from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class EntityBase {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@CreateDateColumn({ comment: "สร้างข้อมูลเมื่อ" })
|
||||
createdAt: Date;
|
||||
|
||||
@Column({
|
||||
comment: "User Id ที่สร้างข้อมูล",
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
createdUserId: String;
|
||||
|
||||
@UpdateDateColumn({ comment: "แก้ไขข้อมูลล่าสุดเมื่อ" })
|
||||
lastUpdatedAt: Date;
|
||||
|
||||
@Column({
|
||||
comment: "User Id ที่แก้ไขข้อมูล",
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
lastUpdateUserId: String;
|
||||
|
||||
@Column({ comment: "ชื่อ User ที่สร้างข้อมูล", length: 200, default: "string" })
|
||||
createdFullName: String;
|
||||
|
||||
@Column({ comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด", length: 200, default: "string" })
|
||||
lastUpdateFullName: String;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue