From 5b2c56cb785974ee796a17b2547071cdcd01e8fa Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:45:44 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B8=A3?= =?UTF-8?q?=E0=B8=B1=E0=B8=9A=20=20date=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entities/ProfileLeave.ts | 105 ++++++++++++---------------------- src/entities/ProfileNopaid.ts | 24 +++----- src/entities/ProfileOther.ts | 16 +++--- 3 files changed, 53 insertions(+), 92 deletions(-) diff --git a/src/entities/ProfileLeave.ts b/src/entities/ProfileLeave.ts index 04b56450..f10e91c5 100644 --- a/src/entities/ProfileLeave.ts +++ b/src/entities/ProfileLeave.ts @@ -259,7 +259,7 @@ export class ProfileLeave extends EntityBase { }) typeLeaveId: string; - @Column({ + @Column({ nullable: true, comment: "เหตุผล", type: "text", @@ -276,104 +276,73 @@ export class ProfileLeave extends EntityBase { } export class CreateProfileLeave { - @Column("uuid") profileId: string | null; - - @Column() isActive: boolean; - - @Column() restCount: number | null; - - @Column() restDay: number | null; - - @Column() sickCount: number | null; - - @Column() sickDay: number | null; - - @Column() otherDay: number | null; - - @Column() personalCount: number | null; - - @Column() personalDay: number | null; - - @Column() studyCount: number | null; - - @Column() absentCount: number | null; - - @Column() absentDay: number | null; - - @Column() agencyCount: number | null; - - @Column() - agencyDay: number | null; - - @Column() + agencyDay: number | null; coupleCount: number | null; - - @Column() coupleDay: number | null; - - @Column() lateCount: number | null; - - @Column() lateDay: number | null; - - @Column() maternityCount: number | null; - - @Column() maternityDay: number | null; - - @Column() militaryCount: number | null; - - @Column() militaryDay: number | null; - - @Column() ordainCount: number | null; - - @Column() ordainDay: number | null; - - @Column() otherCount: number | null; - - @Column() dateStartLeave: Date | null; - - @Column() dateEndLeave: Date | null; - - @Column() numLeave: number | null; - - @Column() sumLeave: number | null; - - @Column() totalLeave: number | null; - - @Column() status: string | null; - - @Column("uuid") typeLeaveId: string | null; - - @Column() reason: string | null; } -export type UpdateProfileLeave = Partial; +export type UpdateProfileLeave = { + profileId: string | null; + isActive: boolean; + restCount: number | null; + restDay: number | null; + sickCount: number | null; + sickDay: number | null; + otherDay: number | null; + personalCount: number | null; + personalDay: number | null; + studyCount: number | null; + absentCount: number | null; + absentDay: number | null; + agencyCount: number | null; + agencyDay: number | null; + coupleCount: number | null; + coupleDay: number | null; + lateCount: number | null; + lateDay: number | null; + maternityCount: number | null; + maternityDay: number | null; + militaryCount: number | null; + militaryDay: number | null; + ordainCount: number | null; + ordainDay: number | null; + otherCount: number | null; + dateStartLeave?: Date | null; + dateEndLeave?: Date | null; + numLeave: number | null; + sumLeave: number | null; + totalLeave: number | null; + status: string | null; + typeLeaveId: string | null; + reason: string | null; +}; diff --git a/src/entities/ProfileNopaid.ts b/src/entities/ProfileNopaid.ts index 0b877d3d..b985994a 100644 --- a/src/entities/ProfileNopaid.ts +++ b/src/entities/ProfileNopaid.ts @@ -68,27 +68,21 @@ export class ProfileNopaid extends EntityBase { } export class CreateProfileNopaid { - @Column("uuid") profileId: string | null; - - @Column() isActive: boolean; - - @Column() date: Date | null; - - @Column() detail: string | null; - - @Column() reference: string | null; - - @Column() refCommandDate: Date | null; - - @Column() refCommandNo: string | null; - } -export type UpdateProfileNopaid = Partial; +export type UpdateProfileNopaid = { + profileId: string | null; + isActive: boolean; + date?: Date | null; + detail: string | null; + reference: string | null; + refCommandDate?: Date | null; + refCommandNo: string | null; +}; diff --git a/src/entities/ProfileOther.ts b/src/entities/ProfileOther.ts index 96dee565..941ecffe 100644 --- a/src/entities/ProfileOther.ts +++ b/src/entities/ProfileOther.ts @@ -18,7 +18,7 @@ export class ProfileOther extends EntityBase { default: false, }) isActive: boolean; - + @Column({ nullable: true, comment: "รายละเอียด", @@ -44,17 +44,15 @@ export class ProfileOther extends EntityBase { } export class CreateProfileOther { - @Column("uuid") profileId: string | null; - - @Column() isActive: boolean; - - @Column() detail: string | null; - - @Column() date: Date | null; } -export type UpdateProfileOther = Partial; +export type UpdateProfileOther = { + profileId: string | null; + isActive: boolean; + detail: string | null; + date?: Date | null; +};