แก้ defult value

This commit is contained in:
Kittapath 2024-02-01 11:02:35 +07:00
parent 9ac7517518
commit c89126a8a2
16 changed files with 381 additions and 110 deletions

View file

@ -20,7 +20,7 @@ export class OrgChild1 extends EntityBase {
nullable: true,
comment: "ชื่อส่วนราชการ",
length: 255,
default: "string",
default: null,
})
orgChild1Name: string;
@ -28,7 +28,7 @@ export class OrgChild1 extends EntityBase {
nullable: true,
comment: "ชื่อย่อส่วนราชการ",
length: 16,
default: "string",
default: null,
})
orgChild1ShortName: string;
@ -36,7 +36,7 @@ export class OrgChild1 extends EntityBase {
nullable: true,
comment: "รหัสส่วนราชการ",
length: 8,
default: "string",
default: null,
})
orgChild1Code: string;
@ -45,12 +45,14 @@ export class OrgChild1 extends EntityBase {
comment: "ระดับส่วนราชการ",
type: "enum",
enum: OrgChild1Rank,
default: null,
})
orgChild1Rank: OrgChild1Rank;
@Column({
nullable: true,
comment: "ลำดับที่ของส่วนราชการภายใน Child เดียวกัน",
default: null,
})
orgChild1Order: number;
@ -58,6 +60,7 @@ export class OrgChild1 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรศัพท์ที่ติดต่อจากภายนอก",
default: null,
})
orgChild1PhoneEx: string;
@ -65,6 +68,7 @@ export class OrgChild1 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรศัพท์ที่ติดต่อจากภายใน",
default: null,
})
orgChild1PhoneIn: string;
@ -72,24 +76,24 @@ export class OrgChild1 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรสาร",
default: null,
})
orgChild1Fax: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgRootId: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgRevisionId: string;
@Column({
nullable: true,
length: 40,
default: "00000000-0000-0000-0000-000000000000",
default: null,
})
isAncestorDNA: string;

View file

@ -7,7 +7,6 @@ import { OrgChild4 } from "./OrgChild4";
import { OrgRevision } from "./OrgRevision";
import { PosMaster } from "./PosMaster";
// ENUM orgChild2Rank
enum OrgChild2Rank {
DEPARTMENT = "DEPARTMENT",
OFFICE = "OFFICE",
@ -16,18 +15,11 @@ enum OrgChild2Rank {
}
@Entity("orgChild2")
export class OrgChild2 extends EntityBase {
// @Column({
// comment: "",
// length: 40,
// default: "00000000-0000-0000-0000-000000000000",
// })
// orgChild2Id: string;
@Column({
nullable: true,
comment: "ชื่อส่วนราชการ",
length: 255,
default: "string",
default: null,
})
orgChild2Name: string;
@ -35,7 +27,7 @@ export class OrgChild2 extends EntityBase {
nullable: true,
comment: "ชื่อย่อส่วนราชการ",
length: 16,
default: "string",
default: null,
})
orgChild2ShortName: string;
@ -43,7 +35,7 @@ export class OrgChild2 extends EntityBase {
nullable: true,
comment: "รหัสส่วนราชการ",
length: 8,
default: "string",
default: null,
})
orgChild2Code: string;
@ -52,13 +44,14 @@ export class OrgChild2 extends EntityBase {
comment: "ระดับส่วนราชการ",
type: "enum",
enum: OrgChild2Rank,
// default: OrgChild2Rank.DEPARTMENT,
default: null,
})
orgChild2Rank: OrgChild2Rank;
@Column({
nullable: true,
comment: "ลำดับที่ของส่วนราชการภายใน Child เดียวกัน",
default: null,
})
orgChild2Order: number;
@ -66,6 +59,7 @@ export class OrgChild2 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรศัพท์ที่ติดต่อจากภายนอก",
default: null,
})
orgChild2PhoneEx: string;
@ -73,6 +67,7 @@ export class OrgChild2 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรศัพท์ที่ติดต่อจากภายใน",
default: null,
})
orgChild2PhoneIn: string;
@ -80,30 +75,29 @@ export class OrgChild2 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรสาร",
default: null,
})
orgChild2Fax: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgRootId: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgChild1Id: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgRevisionId: string;
@Column({
nullable: true,
length: 40,
default: "00000000-0000-0000-0000-000000000000",
default: null,
})
isAncestorDNA: string;

View file

@ -20,7 +20,7 @@ export class OrgChild3 extends EntityBase {
nullable: true,
comment: "ชื่อส่วนราชการ",
length: 255,
default: "string",
default: null,
})
orgChild3Name: string;
@ -28,7 +28,7 @@ export class OrgChild3 extends EntityBase {
nullable: true,
comment: "ชื่อย่อส่วนราชการ",
length: 16,
default: "string",
default: null,
})
orgChild3ShortName: string;
@ -36,7 +36,7 @@ export class OrgChild3 extends EntityBase {
nullable: true,
comment: "รหัสส่วนราชการ",
length: 8,
default: "string",
default: null,
})
orgChild3Code: string;
@ -45,12 +45,14 @@ export class OrgChild3 extends EntityBase {
comment: "ระดับส่วนราชการ",
type: "enum",
enum: OrgChild3Rank,
default: null,
})
orgChild3Rank: OrgChild3Rank;
@Column({
nullable: true,
comment: "ลำดับที่ของส่วนราชการภายใน Child เดียวกัน",
default: null,
})
orgChild3Order: number;
@ -58,6 +60,7 @@ export class OrgChild3 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรศัพท์ที่ติดต่อจากภายนอก",
default: null,
})
orgChild3PhoneEx: string;
@ -65,6 +68,7 @@ export class OrgChild3 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรศัพท์ที่ติดต่อจากภายใน",
default: null,
})
orgChild3PhoneIn: string;
@ -72,36 +76,34 @@ export class OrgChild3 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรสาร",
default: null,
})
orgChild3Fax: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgRootId: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgChild1Id: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgChild2Id: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgRevisionId: string;
@Column({
nullable: true,
length: 40,
default: "00000000-0000-0000-0000-000000000000",
default: null,
})
isAncestorDNA: string;

View file

@ -6,7 +6,7 @@ import { OrgChild2 } from "./OrgChild2";
import { OrgChild3 } from "./OrgChild3";
import { OrgRevision } from "./OrgRevision";
import { PosMaster } from "./PosMaster";
// ENUM orgChild4Rank
enum OrgChild4Rank {
DEPARTMENT = "DEPARTMENT",
OFFICE = "OFFICE",
@ -15,18 +15,11 @@ enum OrgChild4Rank {
}
@Entity("orgChild4")
export class OrgChild4 extends EntityBase {
// @Column({
// comment: "",
// length: 40,
// default: "00000000-0000-0000-0000-000000000000",
// })
// orgChild4Id: string;
@Column({
nullable: true,
comment: "ชื่อส่วนราชการ",
length: 255,
default: "string",
default: null,
})
orgChild4Name: string;
@ -34,7 +27,7 @@ export class OrgChild4 extends EntityBase {
nullable: true,
comment: "ชื่อย่อส่วนราชการ",
length: 16,
default: "string",
default: null,
})
orgChild4ShortName: string;
@ -42,7 +35,7 @@ export class OrgChild4 extends EntityBase {
nullable: true,
comment: "รหัสส่วนราชการ",
length: 8,
default: "string",
default: null,
})
orgChild4Code: string;
@ -51,13 +44,14 @@ export class OrgChild4 extends EntityBase {
comment: "ระดับส่วนราชการ",
type: "enum",
enum: OrgChild4Rank,
// default: OrgChild4Rank.DEPARTMENT,
default: null,
})
orgChild4Rank: OrgChild4Rank;
@Column({
nullable: true,
comment: "ลำดับที่ของส่วนราชการภายใน Child เดียวกัน",
default: null,
})
orgChild4Order: number;
@ -65,6 +59,7 @@ export class OrgChild4 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรศัพท์ที่ติดต่อจากภายนอก",
default: null,
})
orgChild4PhoneEx: string;
@ -72,6 +67,7 @@ export class OrgChild4 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรศัพท์ที่ติดต่อจากภายใน",
default: null,
})
orgChild4PhoneIn: string;
@ -79,42 +75,39 @@ export class OrgChild4 extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรสาร",
default: null,
})
orgChild4Fax: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgRootId: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgChild1Id: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgChild2Id: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgChild3Id: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgRevisionId: string;
@Column({
nullable: true,
length: 40,
default: "00000000-0000-0000-0000-000000000000",
default: null,
})
isAncestorDNA: string;
@ -139,7 +132,7 @@ export class OrgChild4 extends EntityBase {
orgChild3: OrgChild3;
@OneToMany(() => PosMaster, (posMaster) => posMaster.orgChild4)
posMasters: PosMaster[]
posMasters: PosMaster[];
}
export class CreateOrgChild4 {

View file

@ -9,22 +9,14 @@ import { OrgChild4 } from "./OrgChild4";
@Entity("orgRevision")
export class OrgRevision extends EntityBase {
// @Column({
// comment: "",
// length: 40,
// default: "00000000-0000-0000-0000-000000000000",
// })
// orgRevisionId: string;
@Column({
comment: "",
length: 255,
default: "string",
default: null,
})
orgRevisionName: string;
@Column({
nullable: true,
comment: "",
default: false,
})
@ -34,6 +26,7 @@ export class OrgRevision extends EntityBase {
nullable: true,
type: "datetime",
comment: "",
default: null,
})
orgRevisionCreatedAt: Date;
@ -41,11 +34,11 @@ export class OrgRevision extends EntityBase {
nullable: true,
type: "datetime",
comment: "เวลาเผยแพร่",
default: null,
})
orgPublishDate: Date;
@Column({
nullable: true,
comment: "",
default: false,
})

View file

@ -7,7 +7,6 @@ import { OrgChild3 } from "./OrgChild3";
import { OrgChild4 } from "./OrgChild4";
import { PosMaster } from "./PosMaster";
// ENUM orgRootRank
enum OrgRootRank {
DEPARTMENT = "DEPARTMENT",
OFFICE = "OFFICE",
@ -21,7 +20,7 @@ export class OrgRoot extends EntityBase {
nullable: true,
comment: "ชื่อหน่วยงาน",
length: 255,
default: "string",
default: null,
})
orgRootName: string;
@ -29,7 +28,7 @@ export class OrgRoot extends EntityBase {
nullable: true,
comment: "ชื่อย่อหน่วยงาน",
length: 16,
default: "string",
default: null,
})
orgRootShortName: string;
@ -37,7 +36,7 @@ export class OrgRoot extends EntityBase {
nullable: true,
comment: "รหัสหน่วยงาน",
length: 8,
default: "string",
default: null,
})
orgRootCode: string;
@ -46,13 +45,14 @@ export class OrgRoot extends EntityBase {
comment: "ระดับของหน่วยงาน",
type: "enum",
enum: OrgRootRank,
default: OrgRootRank.DEPARTMENT,
default: null,
})
orgRootRank: OrgRootRank;
@Column({
nullable: true,
comment: "ลำดับที่ของหน่วยงาน",
default: null,
})
orgRootOrder: number;
@ -60,6 +60,7 @@ export class OrgRoot extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรศัพท์ที่ติดต่อจากภายนอก",
default: null,
})
orgRootPhoneEx: string;
@ -67,6 +68,7 @@ export class OrgRoot extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรศัพท์ที่ติดต่อจากภายใน",
default: null,
})
orgRootPhoneIn: string;
@ -74,18 +76,19 @@ export class OrgRoot extends EntityBase {
nullable: true,
length: 64,
comment: "หมายเลขโทรสาร",
default: null,
})
orgRootFax: string;
@Column({
nullable: true,
length: 40,
default: "00000000-0000-0000-0000-000000000000",
default: null,
})
isAncestorDNA: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgRevisionId: string;

View file

@ -10,7 +10,7 @@ export class PosDict extends EntityBase {
nullable: true,
comment: "ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง)",
length: 255,
default: "string",
default: null,
})
posDictName: string;
@ -18,21 +18,19 @@ export class PosDict extends EntityBase {
nullable: true,
comment: "สายงาน",
length: 255,
default: "string",
default: null,
})
posDictField: string;
@Column({
length: 40,
comment: "ตำแหน่งประเภท",
default: "00000000-0000-0000-0000-000000000000",
})
posTypeId: string;
@Column({
length: 40,
comment: "ระดับตำแหน่ง",
default: "00000000-0000-0000-0000-000000000000",
})
posLevelId: string;
@ -40,7 +38,7 @@ export class PosDict extends EntityBase {
nullable: true,
length: 40,
comment: "ตำแหน่งทางการบริหาร",
default: "00000000-0000-0000-0000-000000000000",
default: null,
})
posExecutiveId: string;
@ -48,7 +46,7 @@ export class PosDict extends EntityBase {
nullable: true,
length: 255,
comment: "ด้านทางการบริหาร",
default: "string",
default: null,
})
posDictExecutiveField: string;
@ -56,7 +54,7 @@ export class PosDict extends EntityBase {
nullable: true,
length: 255,
comment: "ด้าน/สาขา",
default: "string",
default: null,
})
posDictArea: string;

View file

@ -9,13 +9,14 @@ export class PosExecutive extends EntityBase {
nullable: true,
comment: "ชื่อตำแหน่งทางการบริหาร",
length: 255,
default: "string",
default: null,
})
posExecutiveName: string;
@Column({
nullable: true,
comment: "ลำดับความสำคัญ",
default: null,
})
posExecutivePriority: number;
@ -34,4 +35,4 @@ export class CreatePosExecutive {
posExecutivePriority: number;
}
export type UpdatePosExecutive = Partial<CreatePosExecutive>;
export type UpdatePosExecutive = Partial<CreatePosExecutive>;

View file

@ -3,7 +3,6 @@ import { EntityBase } from "./base/Base";
import { PosType } from "./PosType";
import { Position } from "./Position";
import { PosDict } from "./PosDict";
// ENUM PosLevelAuthority
enum PosLevelAuthority {
HEAD = "HEAD",
DEPUTY = "DEPUTY",
@ -15,13 +14,14 @@ export class PosLevel extends EntityBase {
nullable: true,
comment: "ชื่อระดับตำแหน่ง",
length: 255,
default: "string",
default: null,
})
posLevelName: string;
@Column({
nullable: true,
comment: "ระดับของระดับตำแหน่ง",
default: null,
})
posLevelRank: number;
@ -31,13 +31,13 @@ export class PosLevel extends EntityBase {
"ผู้มีอำนาจสั่งบรรจุของระดับนี้ head = หัวหน้าหน่วยงาน , deputy = ปลัด , governor = ผู้ว่าฯ",
type: "enum",
enum: PosLevelAuthority,
default: null,
})
posLevelAuthority: PosLevelAuthority;
@Column({
length: 40,
comment: "เป็นระดับของประเภทตำแหน่งใด",
default: "00000000-0000-0000-0000-000000000000",
})
posTypeId: string;

View file

@ -20,13 +20,14 @@ export class PosMaster extends EntityBase {
nullable: true,
comment: "Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ)",
length: 16,
default: "string",
default: null,
})
posMasterNoPrefix: string;
@Column({
nullable: true,
comment: "เลขที่ตำแหน่ง เป็นตัวเลข",
default: null,
})
posMasterNo: number;
@ -34,7 +35,7 @@ export class PosMaster extends EntityBase {
nullable: true,
comment: "Suffix หลังเลขที่ตำแหน่ง เช่น ช.",
length: 16,
default: "string",
default: null,
})
posMasterNoSuffix: string;
@ -42,6 +43,7 @@ export class PosMaster extends EntityBase {
nullable: true,
type: "datetime",
comment: "วัน-เวลาที่สร้าง",
default: null,
})
posMasterCreatedAt: Date;
@ -50,19 +52,21 @@ export class PosMaster extends EntityBase {
comment:
"รหัส DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้างและตำแหน่ง ตำแหน่งที่ทำสำเนามากับตำแหน่งเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขตำแหน่งย้อนหลังได้",
length: 40,
default: "string",
default: null,
})
ancestorDNA: string;
isAncestorDNA: string;
@Column({
nullable: true,
comment: "ลำดับที่แสดงผล",
default: null,
})
posMasterOrder: number;
@Column({
nullable: true,
comment: "ลำดับความสำคัญ",
default: null,
})
posMasterPriority: number;
@ -71,6 +75,7 @@ export class PosMaster extends EntityBase {
comment: "สายงานในอัตรากำลัง (หลัก / สนับสนุน) คนละฟิลด์กับสายงานของตำแหน่ง",
type: "enum",
enum: PosMasterLine,
default: null,
})
posMasterLine: PosMasterLine;
@ -114,7 +119,7 @@ export class PosMaster extends EntityBase {
length: 40,
comment:
"คนครองปัจจุบัน เมื่อทำสำเนาโครงสร้างและตำแหน่งพร้อมกับคนครองมา คนครองจะอยู่ในฟิลด์นี้",
default: "string",
default: null,
})
profileIdCurrentHolder: string;
@ -123,13 +128,12 @@ export class PosMaster extends EntityBase {
length: 40,
comment:
"คนที่กำลังจะมาครอง ตอนปรับโครงสร้าง ถ้าเลือกให้ใครมาครอง ProfileId ของคนนั้นจะมาอยู่ในช่องนี้ รวมทั้งตอนเลือกตำแหน่งเพื่อบรรจุ แต่งตั้ง เลื่อน ย้าย ในระบบบรรจุแต่งตั้งด้วย",
default: "string",
default: null,
})
profileIdNextHolder: string;
@Column({
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
orgRevisionId: string; //fk

View file

@ -10,7 +10,7 @@ export class PosType extends EntityBase {
nullable: true,
comment: "ชื่อประเภทตำแหน่ง (ทั่วไป วิชาการ อำนวยการ บริหาร)",
length: 255,
default: "string",
default: null,
})
posTypeName: string;
@ -18,6 +18,7 @@ export class PosType extends EntityBase {
nullable: true,
comment:
"ระดับของประเภทตำแหน่ง ไว้ใช้ระบุว่าประเภทตำแหน่งนี้อยู่ระดับสูงหรือต่ำกว่ากัน โดย 1 = ต่ำกว่า , มากกว่า 1 = สูงกว่า ทั่วไป = 1 วิชาการ = 2 อำนวยการ = 3 บริหาร = 4",
default: null,
})
posTypeRank: number;
@ -39,4 +40,4 @@ export class CreatePosType {
posTypeRank: number;
}
export type UpdatePosType = Partial<CreatePosType>;
export type UpdatePosType = Partial<CreatePosType>;

View file

@ -11,7 +11,7 @@ export class Position extends EntityBase {
nullable: true,
comment: "ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง)",
length: 255,
default: "string",
default: null,
})
positionName: string;
@ -19,21 +19,19 @@ export class Position extends EntityBase {
nullable: true,
comment: "สายงาน",
length: 45,
default: "string",
default: null,
})
positionField: string;
@Column({
length: 40,
comment: "ประเภทตำแหน่ง",
default: "00000000-0000-0000-0000-000000000000",
})
posTypeId: string;
@Column({
length: 40,
comment: "ระดับตำแหน่ง",
default: "00000000-0000-0000-0000-000000000000",
})
posLevelId: string;
@ -41,7 +39,7 @@ export class Position extends EntityBase {
nullable: true,
length: 40,
comment: "ตำแหน่งทางการบริหาร",
default: "00000000-0000-0000-0000-000000000000",
default: null,
})
posExecutiveId: string;
@ -49,7 +47,7 @@ export class Position extends EntityBase {
nullable: true,
comment: "ด้านทางการบริหาร",
length: 255,
default: "string",
default: null,
})
positionExecutiveField: string;
@ -57,20 +55,19 @@ export class Position extends EntityBase {
nullable: true,
comment: "ด้าน/สาขา",
length: 255,
default: "string",
default: null,
})
positionArea: string;
@Column({
nullable: true,
comment: "เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?",
default: false,
})
positionIsSelected: boolean;
@Column({
length: 40,
comment: "เชื่อมโยงกับตารางเลขที่ตำแหน่ง",
default: "00000000-0000-0000-0000-000000000000",
})
posMasterId: string;