diff --git a/src/entities/ProfileAbility.ts b/src/entities/ProfileAbility.ts index b661cd2b..dfdc7206 100644 --- a/src/entities/ProfileAbility.ts +++ b/src/entities/ProfileAbility.ts @@ -13,12 +13,6 @@ export class ProfileAbility extends EntityBase { }) profileId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, comment: "หมายเหตุ", @@ -80,7 +74,6 @@ export class ProfileAbility extends EntityBase { export class CreateProfileAbility { profileId: string | null; - isActive: boolean; remark: string | null; detail: string | null; reference: string | null; @@ -90,7 +83,6 @@ export class CreateProfileAbility { } export type UpdateProfileAbility = { - isActive?: boolean; remark?: string | null; detail?: string | null; reference?: string | null; diff --git a/src/entities/ProfileAbilityHistory.ts b/src/entities/ProfileAbilityHistory.ts index 04974946..17f05d2e 100644 --- a/src/entities/ProfileAbilityHistory.ts +++ b/src/entities/ProfileAbilityHistory.ts @@ -5,12 +5,6 @@ import { ProfileAbility } from "./ProfileAbility"; @Entity("profileAbilityHistory") export class ProfileAbilityHistory extends EntityBase { - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, comment: "หมายเหตุ", diff --git a/src/entities/ProfileCertificate.ts b/src/entities/ProfileCertificate.ts index 078a446a..6efbceac 100644 --- a/src/entities/ProfileCertificate.ts +++ b/src/entities/ProfileCertificate.ts @@ -21,12 +21,6 @@ export class ProfileCertificate extends EntityBase { }) expireDate: Date; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, type: "datetime", @@ -34,7 +28,7 @@ export class ProfileCertificate extends EntityBase { default: null, }) issueDate: Date; - + @Column({ nullable: true, comment: "เลขที่ใบอนุญาต", @@ -50,7 +44,7 @@ export class ProfileCertificate extends EntityBase { default: null, }) certificateType: string; - + @Column({ nullable: true, comment: "หน่วยงานผู้ออกใบอนุญาต", @@ -59,19 +53,20 @@ export class ProfileCertificate extends EntityBase { }) issuer: string; - @OneToMany(() => ProfileCertificateHistory, (profileCertificateHistory) => profileCertificateHistory.histories) + @OneToMany( + () => ProfileCertificateHistory, + (profileCertificateHistory) => profileCertificateHistory.histories, + ) profileCertificateHistories: ProfileCertificateHistory[]; @ManyToOne(() => Profile, (profile) => profile.profileCertificates) @JoinColumn({ name: "profileId" }) profile: Profile; - } export class CreateProfileCertificate { profileId: string | null; expireDate: Date | null; - isActive: boolean; issueDate: Date | null; certificateNo: string | null; certificateType: string | null; @@ -80,7 +75,6 @@ export class CreateProfileCertificate { export type UpdateProfileCertificate = { expireDate?: Date | null; - isActive?: boolean; issueDate?: Date | null; certificateNo?: string | null; certificateType?: string | null; diff --git a/src/entities/ProfileCertificateHistory.ts b/src/entities/ProfileCertificateHistory.ts index 6ad1eb6f..eee63916 100644 --- a/src/entities/ProfileCertificateHistory.ts +++ b/src/entities/ProfileCertificateHistory.ts @@ -5,7 +5,6 @@ import { ProfileCertificate } from "./ProfileCertificate"; @Entity("profileCertificateHistory") export class ProfileCertificateHistory extends EntityBase { - @Column({ nullable: true, type: "datetime", @@ -14,12 +13,6 @@ export class ProfileCertificateHistory extends EntityBase { }) expireDate: Date; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, type: "datetime", @@ -27,7 +20,7 @@ export class ProfileCertificateHistory extends EntityBase { default: null, }) issueDate: Date; - + @Column({ nullable: true, comment: "เลขที่ใบอนุญาต", @@ -43,7 +36,7 @@ export class ProfileCertificateHistory extends EntityBase { default: null, }) certificateType: string; - + @Column({ nullable: true, comment: "หน่วยงานผู้ออกใบอนุญาต", @@ -60,35 +53,32 @@ export class ProfileCertificateHistory extends EntityBase { }) profileCertificateId: string; - @ManyToOne(() => ProfileCertificate, (profileCertificate) => profileCertificate.profileCertificateHistories) + @ManyToOne( + () => ProfileCertificate, + (profileCertificate) => profileCertificate.profileCertificateHistories, + ) @JoinColumn({ name: "profileCertificateId" }) histories: ProfileCertificate; - } export class CreateProfileCertificateHistory { - @Column() expireDate: Date | null; - @Column() - isActive: boolean; - @Column() issueDate: Date | null; - + @Column() certificateNo: string | null; @Column() certificateType: string | null; - + @Column() issuer: string | null; @Column("uuid") profileCertificateId: string | null; - } export type UpdateProfileCertificateHistory = Partial; diff --git a/src/entities/ProfileChangeName.ts b/src/entities/ProfileChangeName.ts index 0323c044..cfd9cf16 100644 --- a/src/entities/ProfileChangeName.ts +++ b/src/entities/ProfileChangeName.ts @@ -14,12 +14,6 @@ export class ProfileChangeName extends EntityBase { }) profileId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, length: 40, @@ -68,17 +62,19 @@ export class ProfileChangeName extends EntityBase { }) documentId: string; - @OneToMany(() => ProfileChangeNameHistory, (profileChangeNameHistory) => profileChangeNameHistory.histories) - profileChangeNameHistories: ProfileChangeNameHistory[]; + @OneToMany( + () => ProfileChangeNameHistory, + (profileChangeNameHistory) => profileChangeNameHistory.histories, + ) + profileChangeNameHistories: ProfileChangeNameHistory[]; - // @ManyToOne(() => Profile, (profile) => profile.profileChangeName) - // @JoinColumn({ name: "profileId" }) - // profile: Profile; + // @ManyToOne(() => Profile, (profile) => profile.profileChangeName) + // @JoinColumn({ name: "profileId" }) + // profile: Profile; } export class CreateProfileChangeName { profileId: string | null; - isActive: boolean; prefixId: string | null; prefix: string | null; firstName: string | null; @@ -88,7 +84,6 @@ export class CreateProfileChangeName { } export type UpdateProfileChangeName = { - isActive?: boolean; prefixId?: string | null; prefix?: string | null; firstName?: string | null; diff --git a/src/entities/ProfileChangeNameHistory.ts b/src/entities/ProfileChangeNameHistory.ts index 1af5bcb1..d9f1489f 100644 --- a/src/entities/ProfileChangeNameHistory.ts +++ b/src/entities/ProfileChangeNameHistory.ts @@ -5,13 +5,6 @@ import { ProfileChangeName } from "./ProfileChangeName"; @Entity("profileChangeNameHistory") export class ProfileChangeNameHistory extends EntityBase { - - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, length: 40, @@ -68,15 +61,16 @@ export class ProfileChangeNameHistory extends EntityBase { }) profileChangeNameId: string; - @ManyToOne(() => ProfileChangeName, (profileChangeName) => profileChangeName.profileChangeNameHistories) + @ManyToOne( + () => ProfileChangeName, + (profileChangeName) => profileChangeName.profileChangeNameHistories, + ) @JoinColumn({ name: "profileChangeNameId" }) histories: ProfileChangeName; - } export class CreateProfileChangeNameHistory { profileChangeNameId: string | null; - isActive: boolean; prefixId: string | null; prefix: string | null; firstName: string | null; @@ -87,7 +81,6 @@ export class CreateProfileChangeNameHistory { export type UpdateProfileChangeNameHistory = { profileChangeNameId?: string | null; - isActive?: boolean; prefixId?: string | null; prefix?: string | null; firstName?: string | null; diff --git a/src/entities/ProfileDiscipline.ts b/src/entities/ProfileDiscipline.ts index 8feee9aa..d30c82e5 100644 --- a/src/entities/ProfileDiscipline.ts +++ b/src/entities/ProfileDiscipline.ts @@ -20,12 +20,6 @@ export class ProfileDiscipline extends EntityBase { }) profileId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, comment: "ระดับความผิด", @@ -80,7 +74,7 @@ export class ProfileDiscipline extends EntityBase { export class CreateProfileDiscipline { date: Date | null; profileId: string; - isActive: boolean | null; + level: string | null; detail: string | null; refCommandDate: Date | null; @@ -90,7 +84,7 @@ export class CreateProfileDiscipline { export type UpdateProfileDiscipline = { date?: Date | null; - isActive?: boolean | null; + level?: string | null; detail?: string | null; refCommandDate?: Date | null; diff --git a/src/entities/ProfileDisciplineHistory.ts b/src/entities/ProfileDisciplineHistory.ts index 62d9131c..afafed17 100644 --- a/src/entities/ProfileDisciplineHistory.ts +++ b/src/entities/ProfileDisciplineHistory.ts @@ -20,12 +20,6 @@ export class ProfileDisciplineHistory extends EntityBase { }) profileDisciplineId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, comment: "ระดับความผิด", @@ -41,7 +35,7 @@ export class ProfileDisciplineHistory extends EntityBase { default: null, }) detail: string; - + @Column({ nullable: true, type: "datetime", @@ -66,7 +60,10 @@ export class ProfileDisciplineHistory extends EntityBase { }) unStigma: string; - @ManyToOne(() => ProfileDiscipline, (profileDiscipline) => profileDiscipline.profileDisciplineHistories) + @ManyToOne( + () => ProfileDiscipline, + (profileDiscipline) => profileDiscipline.profileDisciplineHistories, + ) @JoinColumn({ name: "profileDisciplineId" }) histories: ProfileDiscipline; } diff --git a/src/entities/ProfileDuty.ts b/src/entities/ProfileDuty.ts index fb031173..650b5f96 100644 --- a/src/entities/ProfileDuty.ts +++ b/src/entities/ProfileDuty.ts @@ -13,12 +13,6 @@ export class ProfileDuty extends EntityBase { }) profileId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, type: "datetime", @@ -77,7 +71,7 @@ export class ProfileDuty extends EntityBase { export class CreateProfileDuty { profileId: string | null; - isActive: boolean; + dateStart: Date | null; dateEnd: Date | null; detail: string | null; @@ -87,7 +81,6 @@ export class CreateProfileDuty { } export type UpdateProfileDuty = { - isActive?: boolean; dateStart?: Date | null; dateEnd?: Date | null; detail?: string | null; diff --git a/src/entities/ProfileDutyHistory.ts b/src/entities/ProfileDutyHistory.ts index 989cefba..af470777 100644 --- a/src/entities/ProfileDutyHistory.ts +++ b/src/entities/ProfileDutyHistory.ts @@ -5,12 +5,6 @@ import { ProfileDuty } from "./ProfileDuty"; @Entity("profileDutyHistory") export class ProfileDutyHistory extends EntityBase { - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, type: "datetime", diff --git a/src/entities/ProfileEducation.ts b/src/entities/ProfileEducation.ts index eb45ed7b..c69d08a2 100644 --- a/src/entities/ProfileEducation.ts +++ b/src/entities/ProfileEducation.ts @@ -13,12 +13,6 @@ export class ProfileEducation extends EntityBase { }) profileId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, comment: "ประเทศ", @@ -178,7 +172,7 @@ export class ProfileEducation extends EntityBase { export class CreateProfileEducation { profileId: string | null; - isActive: boolean; + country: string | null; degree: string | null; duration: string | null; @@ -201,7 +195,6 @@ export class CreateProfileEducation { } export type UpdateProfileEducation = { - isActive?: boolean; country?: string | null; degree?: string | null; duration?: string | null; diff --git a/src/entities/ProfileEducationHistory.ts b/src/entities/ProfileEducationHistory.ts index 3454130c..f8fcf8aa 100644 --- a/src/entities/ProfileEducationHistory.ts +++ b/src/entities/ProfileEducationHistory.ts @@ -5,12 +5,6 @@ import { ProfileEducation } from "./ProfileEducation"; @Entity("profileEducationHistory") export class ProfileEducationHistory extends EntityBase { - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, comment: "ประเทศ", @@ -174,9 +168,6 @@ export class ProfileEducationHistory extends EntityBase { } export class CreateProfileEducationHistory { - @Column() - isActive: boolean; - @Column() country: string | null; diff --git a/src/entities/ProfileFamily.ts b/src/entities/ProfileFamily.ts index c939534a..21cc1351 100644 --- a/src/entities/ProfileFamily.ts +++ b/src/entities/ProfileFamily.ts @@ -4,12 +4,6 @@ import { Profile } from "./Profile"; @Entity("profileFamilyHistory") export class ProfileFamilyHistory extends EntityBase { - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, default: null, @@ -170,12 +164,6 @@ export class ProfileFamilyHistory extends EntityBase { @Entity("profileChildren") export class ProfileChildren extends EntityBase { - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, default: null, @@ -262,7 +250,6 @@ export class ProfileChildrenHistory extends ProfileChildren { } export type CreateChildren = { - isActive: boolean; childrenCareer: string; childrenFirstName: string; childrenLastName: string; @@ -273,7 +260,6 @@ export type CreateChildren = { export type UpdateChildren = { id: string; - isActive?: boolean | null; childrenCareer?: string | null; childrenFirstName?: string | null; childrenLastName?: string | null; @@ -283,7 +269,6 @@ export type UpdateChildren = { }; export type CreateProfileFamily = { - isActive: boolean | null; couple: boolean | null; couplePrefix: string | null; coupleFirstName: string | null; @@ -310,7 +295,6 @@ export type CreateProfileFamily = { export type UpdateProfileFamily = { id: string; - isActive?: boolean | null; couple?: boolean | null; couplePrefix?: string | null; coupleFirstName?: string | null; diff --git a/src/entities/ProfileGovernment.ts b/src/entities/ProfileGovernment.ts index b9082567..41b86b34 100644 --- a/src/entities/ProfileGovernment.ts +++ b/src/entities/ProfileGovernment.ts @@ -4,12 +4,6 @@ import { Profile } from "./Profile"; @Entity("profileGovernment") export class ProfileGovernment extends EntityBase { - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, length: 40, @@ -172,7 +166,6 @@ export class ProfileGovernment extends EntityBase { positionEmployeePositionSide: string; } export type CreateProfileGovernment = { - isActive: boolean | null; positionId: string | null; profileId: string | null; profile: Profile | null; @@ -199,7 +192,6 @@ export type CreateProfileGovernment = { }; export type UpdateProfileGovernment = { - isActive?: boolean | null; positionId?: string | null; profile?: Profile | null; posNoId?: string | null; diff --git a/src/entities/ProfileInsignia.ts b/src/entities/ProfileInsignia.ts index 183930c0..623753f5 100644 --- a/src/entities/ProfileInsignia.ts +++ b/src/entities/ProfileInsignia.ts @@ -14,12 +14,6 @@ export class ProfileInsignia extends EntityBase { }) profileId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ comment: "ปีที่ยื่นขอ", }) diff --git a/src/entities/ProfileInsigniaHistory.ts b/src/entities/ProfileInsigniaHistory.ts index 5e8584aa..b5aa3d5e 100644 --- a/src/entities/ProfileInsigniaHistory.ts +++ b/src/entities/ProfileInsigniaHistory.ts @@ -5,12 +5,6 @@ import { Insignia } from "./Insignia"; @Entity("profileInsigniaHistory") export class ProfileInsigniaHistory extends EntityBase { - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ comment: "ปีที่ยื่นขอ" }) year: number; diff --git a/src/entities/ProfileNopaid.ts b/src/entities/ProfileNopaid.ts index 9a429e89..fd2092ae 100644 --- a/src/entities/ProfileNopaid.ts +++ b/src/entities/ProfileNopaid.ts @@ -13,12 +13,6 @@ export class ProfileNopaid extends EntityBase { }) profileId: string; - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, type: "datetime", @@ -69,7 +63,7 @@ export class ProfileNopaid extends EntityBase { export class CreateProfileNopaid { profileId: string | null; - isActive: boolean; + date: Date | null; detail: string | null; reference: string | null; @@ -78,7 +72,6 @@ export class CreateProfileNopaid { } export type UpdateProfileNopaid = { - isActive?: boolean; date?: Date | null; detail?: string | null; reference?: string | null; diff --git a/src/entities/ProfileNopaidHistory.ts b/src/entities/ProfileNopaidHistory.ts index e8f4cf71..a995d4c6 100644 --- a/src/entities/ProfileNopaidHistory.ts +++ b/src/entities/ProfileNopaidHistory.ts @@ -5,12 +5,6 @@ import { ProfileNopaid } from "./ProfileNopaid"; @Entity("profileNopaidHistory") export class ProfileNopaidHistory extends EntityBase { - @Column({ - comment: "สถานะการใช้งาน", - default: false, - }) - isActive: boolean; - @Column({ nullable: true, type: "datetime",