From 8b3398e7f7174327e927a8d74e255f6021d28ff4 Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:21:22 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B8=A5=E0=B8=9A=20column=20=E0=B9=84?= =?UTF-8?q?=E0=B8=A1=E0=B9=88=E0=B9=84=E0=B8=94=E0=B9=89=E0=B9=83=E0=B8=8A?= =?UTF-8?q?=E0=B9=89=E0=B8=AD=E0=B8=AD=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entities/ProfileHonor.ts | 19 +------------ src/entities/ProfileInsignia.ts | 15 +++-------- src/entities/ProfileOther.ts | 8 ------ src/entities/ProfileOtherHistory.ts | 6 ----- src/entities/ProfileTraining.ts | 37 +++++++------------------- src/entities/ProfileTrainingHistory.ts | 13 --------- 6 files changed, 14 insertions(+), 84 deletions(-) diff --git a/src/entities/ProfileHonor.ts b/src/entities/ProfileHonor.ts index cf16b268..ff04915c 100644 --- a/src/entities/ProfileHonor.ts +++ b/src/entities/ProfileHonor.ts @@ -13,12 +13,6 @@ export class ProfileHonor extends EntityBase { }) profileId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, length: 2000, @@ -38,7 +32,7 @@ export class ProfileHonor extends EntityBase { @Column({ nullable: true, length: 200, - comment: "หน่วยงานที่ออก", + comment: "หน่วยงานที่ออก ", default: null, }) issuer: string; @@ -59,13 +53,6 @@ export class ProfileHonor extends EntityBase { }) refCommandNo: string; - @Column({ - nullable: true, - comment: "ประเภทช่วงเวลาการศึกษา", - default: null, - }) - isDate: boolean; - @OneToMany(() => ProfileHonorHistory, (profileHonorHistory) => profileHonorHistory.histories) profileHonorHistories: ProfileHonorHistory[]; @@ -76,21 +63,17 @@ export class ProfileHonor extends EntityBase { export class CreateProfileHonor { profileId: string | null; - isActive: boolean; detail: string | null; issueDate: Date | null; issuer: string | null; refCommandDate: Date | null; refCommandNo: string | null; - isDate: boolean | null; } export type UpdateProfileHonor = { - isActive?: boolean; detail?: string | null; issueDate?: Date | null; issuer?: string | null; refCommandDate?: Date | null; refCommandNo?: string | null; - isDate?: boolean | null; }; diff --git a/src/entities/ProfileInsignia.ts b/src/entities/ProfileInsignia.ts index 7e60d6f1..9cf8ffad 100644 --- a/src/entities/ProfileInsignia.ts +++ b/src/entities/ProfileInsignia.ts @@ -57,14 +57,6 @@ export class ProfileInsignia extends EntityBase { }) page: string; - @Column({ - nullable: true, - type: "datetime", - comment: "ลงวันที่", - default: null, - }) - receiveDate: Date; - @Column({ nullable: true, type: "datetime", @@ -136,13 +128,13 @@ export class ProfileInsignia extends EntityBase { export class CreateProfileInsignia { profileId: string | null; - isActive: boolean; + year: number; no: string | null; volume: string | null; section: string | null; page: string | null; - receiveDate: Date | null; + insigniaId: string; dateAnnounce: Date | null; issue: string | null; @@ -153,13 +145,12 @@ export class CreateProfileInsignia { } export type UpdateProfileInsignia = { - isActive?: boolean; year?: number; no?: string | null; volume?: string | null; section?: string | null; page?: string | null; - receiveDate?: Date | null; + insigniaId?: string | null; insigniaType?: string | null; dateAnnounce?: Date | null; diff --git a/src/entities/ProfileOther.ts b/src/entities/ProfileOther.ts index 61cc5804..db84c3d2 100644 --- a/src/entities/ProfileOther.ts +++ b/src/entities/ProfileOther.ts @@ -13,12 +13,6 @@ export class ProfileOther extends EntityBase { }) profileId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, comment: "รายละเอียด", @@ -45,13 +39,11 @@ export class ProfileOther extends EntityBase { export class CreateProfileOther { profileId: string | null; - isActive: boolean; detail: string | null; date: Date | null; } export type UpdateProfileOther = { - isActive?: boolean; detail?: string | null; date?: Date | null; }; diff --git a/src/entities/ProfileOtherHistory.ts b/src/entities/ProfileOtherHistory.ts index ed374bef..15ea3588 100644 --- a/src/entities/ProfileOtherHistory.ts +++ b/src/entities/ProfileOtherHistory.ts @@ -12,12 +12,6 @@ export class ProfileOtherHistory extends EntityBase { }) profileOtherId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, comment: "รายละเอียด", diff --git a/src/entities/ProfileTraining.ts b/src/entities/ProfileTraining.ts index f0d5b66f..05807251 100644 --- a/src/entities/ProfileTraining.ts +++ b/src/entities/ProfileTraining.ts @@ -13,16 +13,10 @@ export class ProfileTraining extends EntityBase { }) profileId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, type: "datetime", - comment: "วันเริ่มต้นการฝึกอบรม/ดูงาน", + comment: "วันเริ่มต้นการฝึกอบรม/ดูงาน ", default: null, }) startDate: Date; @@ -30,7 +24,7 @@ export class ProfileTraining extends EntityBase { @Column({ nullable: true, type: "datetime", - comment: "วันสิ้นสุดการฝึกอบรม/ดูงาน", + comment: "วันสิ้นสุดการฝึกอบรม/ดูงาน ", default: null, }) endDate: Date; @@ -38,7 +32,7 @@ export class ProfileTraining extends EntityBase { @Column({ nullable: true, length: 200, - comment: "เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ", + comment: "เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ ", default: null, }) numberOrder: string; @@ -46,7 +40,7 @@ export class ProfileTraining extends EntityBase { @Column({ nullable: true, length: 200, - comment: "หัวข้อการฝึกอบรม/ดูงาน", + comment: "หัวข้อการฝึกอบรม/ดูงาน ", default: null, }) topic: string; @@ -54,7 +48,7 @@ export class ProfileTraining extends EntityBase { @Column({ nullable: true, length: 200, - comment: "สถานที่ฝึกอบรม/ดูงาน", + comment: "สถานที่ฝึกอบรม/ดูงาน ", default: null, }) place: string; @@ -62,7 +56,7 @@ export class ProfileTraining extends EntityBase { @Column({ nullable: true, type: "datetime", - comment: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่", + comment: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่ ", default: null, }) dateOrder: Date; @@ -70,7 +64,7 @@ export class ProfileTraining extends EntityBase { @Column({ nullable: true, length: 200, - comment: "หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน", + comment: "หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน ", default: null, }) department: string; @@ -78,7 +72,7 @@ export class ProfileTraining extends EntityBase { @Column({ nullable: true, length: 200, - comment: "รวมระยะเวลาในการฝึกอบรม/ดูงาน", + comment: "รวมระยะเวลาในการฝึกอบรม/ดูงาน ", default: null, }) duration: string; @@ -86,25 +80,18 @@ export class ProfileTraining extends EntityBase { @Column({ nullable: true, length: 200, - comment: "ชื่อโครงการ/หลักสูตรการฝึกอบรม", + comment: "ชื่อโครงการ/หลักสูตรการฝึกอบรม ", default: null, }) name: string; @Column({ nullable: true, - comment: "ปีที่อบรม (พ.ศ.)", + comment: "ปีที่อบรม (พ.ศ.) ", default: null, }) yearly: number; - @Column({ - nullable: true, - comment: "ประเภทช่วงเวลาการศึกษา", - default: null, - }) - isDate: boolean; - @OneToMany( () => ProfileTrainingHistory, (profileTrainingHistory) => profileTrainingHistory.histories, @@ -118,7 +105,6 @@ export class ProfileTraining extends EntityBase { export class CreateProfileTraining { profileId: string | null; - isActive: boolean; startDate: Date | null; endDate: Date | null; numberOrder: string | null; @@ -129,11 +115,9 @@ export class CreateProfileTraining { duration: string | null; name: string | null; yearly: number | null; - isDate: boolean | null; } export type UpdateProfileTraining = { - isActive?: boolean; startDate?: Date | null; endDate?: Date | null; numberOrder?: string | null; @@ -144,5 +128,4 @@ export type UpdateProfileTraining = { duration?: string | null; name?: string | null; yearly?: number | null; - isDate?: boolean | null; }; diff --git a/src/entities/ProfileTrainingHistory.ts b/src/entities/ProfileTrainingHistory.ts index cfab7363..f54d8b94 100644 --- a/src/entities/ProfileTrainingHistory.ts +++ b/src/entities/ProfileTrainingHistory.ts @@ -5,12 +5,6 @@ import { ProfileTraining } from "./ProfileTraining"; @Entity("profileTrainingHistory") export class ProfileTrainingHistory extends EntityBase { - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, type: "datetime", @@ -98,13 +92,6 @@ export class ProfileTrainingHistory extends EntityBase { }) profileTrainingId: string; - @Column({ - nullable: true, - comment: "ประเภทช่วงเวลาการศึกษา", - default: null, - }) - isDate: boolean; - @ManyToOne(() => ProfileTraining, (profileTraining) => profileTraining.profileTrainingHistories) @JoinColumn({ name: "profileTrainingId" }) histories: ProfileTraining;