import { Entity, Column } from "typeorm"; import { EntityBase } from "./base/Base"; @Entity("registry") export class Registry extends EntityBase { @Column({ nullable: true, length: 40, comment: "คีย์นอก(FK)ของตาราง profile", default: null, }) profileId: string; @Column({ nullable: true, comment: "เลขประจำตัวประชาชน", default: null, length: 13, }) citizenId: string; @Column({ nullable: true, length: 20, comment: "คำนำหน้าชื่อ เช่น นาย นาง นางสาว", 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({ comment: "ทดลองปฏิบัติหน้าที่", default: false, }) isProbation: boolean; @Column({ comment: "พ้นราชการ", default: false, }) isLeave: boolean; @Column({ comment: "เกษียณ", default: false, }) isRetirement: boolean; @Column({ nullable: true, length: 255, comment: "ประเภทพ้นคำสั่งพ้นจากราชการ", default: null, }) leaveType: string; @Column({ nullable: true, comment: "เลขที่ตำแหน่ง เป็นตัวเลข", default: null, }) posMasterNo: string; @Column({ nullable: true, length: 40, comment: "คีย์นอก(FK)ของตาราง orgRoot", default: null, }) orgRootId?: string; @Column({ nullable: true, length: 40, comment: "คีย์นอก(FK)ของตาราง orgChild1", default: null, }) orgChild1Id?: string; @Column({ nullable: true, length: 40, comment: "คีย์นอก(FK)ของตาราง orgChild2", default: null, }) orgChild2Id?: string; @Column({ nullable: true, length: 40, comment: "คีย์นอก(FK)ของตาราง orgChild3", default: null, }) orgChild3Id?: string; @Column({ nullable: true, length: 40, comment: "คีย์นอก(FK)ของตาราง orgChild4", default: null, }) orgChild4Id?: string; @Column({ nullable: true, comment: "ชื่อหน่วยงาน", length: 255, default: null, }) orgRootName: string; @Column({ nullable: true, comment: "ชื่อส่วนราชการ Child1", length: 255, default: null, }) orgChild1Name: string; @Column({ nullable: true, comment: "ชื่อส่วนราชการ Child2", length: 255, default: null, }) orgChild2Name: string; @Column({ nullable: true, comment: "ชื่อส่วนราชการ Child3", length: 255, default: null, }) orgChild3Name: string; @Column({ nullable: true, comment: "ชื่อส่วนราชการ Child4", length: 255, default: null, }) orgChild4Name: string; @Column({ nullable: true, length: 255, comment: "สังกัด", default: null, }) org: string; @Column({ nullable: true, length: 255, comment: "เลขที่ตำแหน่ง", default: null, }) searchShortName: string; @Column({ nullable: true, comment: "ชื่อตำแหน่งทางการบริหาร", length: 255, default: null, }) posExecutiveName: string; @Column({ nullable: true, comment: "ชื่อตำแหน่งในสายงาน", length: 255, default: null, }) position: string; @Column({ nullable: true, length: 255, comment: "ประเภทตำแหน่ง", default: null, }) posTypeName: string; @Column({ nullable: true, length: 255, comment: "ระดับตำแหน่ง", default: null, }) posLevelName: string; @Column({ nullable: true, comment: "เพศ", length: 40, default: null, }) gender: string; @Column({ nullable: true, comment: "ความสัมพันธ์", length: 40, default: null, }) relationship: string; @Column({ nullable: true, type: "datetime", comment: "วันที่บรรจุ", default: null, }) dateAppoint: Date; @Column({ nullable: true, type: "datetime", comment: "วันครบเกษียณอายุ", default: null, }) dateRetire: Date; @Column({ nullable: true, type: "datetime", comment: "วันที่เกษียณอายุราชการตามกฏหมาย", default: null, }) dateRetireLaw: Date; @Column({ nullable: true, type: "datetime", comment: "วันเกิด", default: null, }) birthdate: Date; @Column({ nullable: true, comment: "วุฒิการศึกษา", length: 255, default: null, }) degrees: string; @Column({ nullable: true, comment: "อายุ", default: null, }) age: number; @Column({ nullable: true, comment: "จำนวนปีระยะเวลาดำรงตำแหน่งในสายงาน", default: null, }) Years: number; @Column({ nullable: true, comment: "จำนวนเดือนระยะเวลาดำรงตำแหน่งในสายงาน", default: null, }) Months: number; @Column({ nullable: true, comment: "จำนวนวันระยะเวลาดำรงตำแหน่งในสายงาน", default: null, }) Days: number; @Column({ nullable: true, comment: "จำนวนปีระยะเวลาดำรงตำแหน่งตามระดับ", default: null, }) levelYears: number; @Column({ nullable: true, comment: "จำนวนเดือนระยะเวลาดำรงตำแหน่งตามระดับ", default: null, }) levelMonths: number; @Column({ nullable: true, comment: "จำนวนวันระยะเวลาดำรงตำแหน่งตามระดับ", default: null, }) levelDays: number; @Column({ nullable: true, comment: "จำนวนปีระยะเวลาดำรงตำแหน่งทางการบริหาร", default: null, }) posExecutiveYears: number; @Column({ nullable: true, comment: "จำนวนเดือนระยะเวลาดำรงตำแหน่งทางการบริหาร", default: null, }) posExecutiveMonths: number; @Column({ nullable: true, comment: "จำนวนวันระยะเวลาดำรงตำแหน่งทางการบริหาร", default: null, }) posExecutiveDays: number; @Column({ nullable: true, comment: "ด้าน/สาขา", length: 255, default: null, }) positionArea: string; @Column({ type: "text", nullable: true, comment: "วุฒิการศึกษา", default: null, }) Educations: string; @Column({ nullable: true, comment: "ระดับศึกษา", length: 255, default: null, }) educationLevels: string; @Column({ nullable: true, comment: "สาขาวิชา/ทาง", length: 255, default: null, }) fields: string; } export class RegistryCreateDto { profileId: string; citizenId?: string | null; prefix?: string | null; firstName?: string | null; lastName?: string | null; isProbation?: boolean | null; isLeave?: boolean | null; isRetirement?: boolean | null; leaveType?: string | null; posMasterNo?: string | null; orgRootId?: string | null; orgChild1Id?: string | null; orgChild2Id?: string | null; orgChild3Id?: string | null; orgChild4Id?: string | null; orgRootName?: string | null; orgChild1Name?: string | null; orgChild2Name?: string | null; orgChild3Name?: string | null; orgChild4Name?: string | null; org?: string | null; searchShortName?: string | null; posExecutiveName?: string | null; position?: string | null; posTypeName?: string | null; posLevelName?: string | null; gender?: string | null; relationship?: string | null; dateAppoint?: Date | null; dateRetire?: Date | null; dateRetireLaw?: Date | null; birthdate?: Date | null; degrees?: string | null; age?: number | null; Years?: number | null; Months?: number | null; Days?: number | null; levelYears?: number | null; levelMonths?: number | null; levelDays?: number | null; posExecutiveYears?: number | null; posExecutiveMonths?: number | null; posExecutiveDays?: number | null; positionArea?: string | null; Educations?: string | null; educationLevels?: string | null; fields?: string | null; }