2025-08-26 13:47:43 +07:00
import { Entity , Column } from "typeorm" ;
import { EntityBase } from "./base/Base" ;
@Entity ( "posMasterEmployeeHistory" )
export class PosMasterEmployeeHistory extends EntityBase {
@Column ( {
nullable : true ,
comment : "คำนำหน้า" ,
length : 255 ,
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 : "อักษรย่อ" ,
length : 16 ,
default : null ,
} )
shortName : string ;
@Column ( {
nullable : true ,
comment : "Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ)" ,
length : 16 ,
default : null ,
} )
posMasterNoPrefix : string ;
@Column ( {
nullable : true ,
comment : "เลขที่ตำแหน่ง เป็นตัวเลข" ,
default : null ,
} )
posMasterNo : number ;
@Column ( {
nullable : true ,
comment : "Suffix หลังเลขที่ตำแหน่ง เช่น ช." ,
length : 16 ,
default : null ,
} )
posMasterNoSuffix : string ;
@Column ( {
nullable : true ,
comment : "ชื่อตำแหน่ง" ,
length : 255 ,
default : null ,
} )
position : string ;
@Column ( {
nullable : true ,
comment : "ชื่อประเภทตำแหน่ง" ,
length : 255 ,
default : null ,
} )
posType : string ;
@Column ( {
nullable : true ,
comment : "ชื่อระดับตำแหน่ง" ,
length : 255 ,
default : null ,
} )
posLevel : string ;
@Column ( {
nullable : true ,
comment : "ชื่อตำแหน่งทางการบริหาร" ,
length : 255 ,
default : null ,
} )
posExecutive : string ;
@Column ( {
nullable : true ,
comment :
"รหัส DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้างและตำแหน่ง ตำแหน่งที่ทำสำเนามากับตำแหน่งเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขตำแหน่งย้อนหลังได้" ,
length : 40 ,
default : null ,
} )
ancestorDNA : string ;
2026-01-13 01:37:02 +07:00
// @Column({
// nullable: true,
// length: 40,
// comment: "คีย์นอก(FK)ของตาราง profile",
// default: null,
// })
// profileId: string;
// @Column({
// nullable: true,
// length: 40,
// comment: "dna ของตาราง orgRoot",
// default: null,
// })
// rootDnaId: string;
// @Column({
// nullable: true,
// length: 40,
// comment: "dna ของตาราง orgChild1",
// default: null,
// })
// child1DnaId: string;
// @Column({
// nullable: true,
// length: 40,
// comment: "dna ของตาราง orgChild2",
// default: null,
// })
// child2DnaId: string;
// @Column({
// nullable: true,
// length: 40,
// comment: "dna ของตาราง orgChild3",
// default: null,
// })
// child3DnaId: string;
// @Column({
// nullable: true,
// length: 40,
// comment: "dna ของตาราง orgChild4",
// default: null,
// })
// child4DnaId: string;
2025-08-26 13:47:43 +07:00
}