diff --git a/src/controllers/ProfileHonorController.ts b/src/controllers/ProfileHonorController.ts index 8d71dece..96c76d86 100644 --- a/src/controllers/ProfileHonorController.ts +++ b/src/controllers/ProfileHonorController.ts @@ -77,6 +77,7 @@ export class ProfileHonorController extends Controller { issuer: "issuer", refCommandDate: "2024-03-12T10:10:31.000Z", refCommandNo: "refCommandNo", + isDate: true, profileHonorId: "debfa8a7-83fb-4801-a940-8ae74e7638d3", }, { @@ -93,6 +94,7 @@ export class ProfileHonorController extends Controller { issuer: "string", refCommandDate: "2024-03-12T10:09:47.000Z", refCommandNo: "string", + isDate: true, profileHonorId: "debfa8a7-83fb-4801-a940-8ae74e7638d3", }, ], diff --git a/src/controllers/ProfileTrainingController.ts b/src/controllers/ProfileTrainingController.ts index 68857e2f..00585eca 100644 --- a/src/controllers/ProfileTrainingController.ts +++ b/src/controllers/ProfileTrainingController.ts @@ -91,6 +91,7 @@ export class ProfileTrainingController extends Controller { duration: "string", name: "string", yearly: 0, + isDate: true, profileTrainingId: "3cf02fb7-2f0c-471b-b641-51d557375c0a", }, { @@ -112,6 +113,7 @@ export class ProfileTrainingController extends Controller { duration: "string", name: "name", yearly: 0, + isDate: true, profileTrainingId: "3cf02fb7-2f0c-471b-b641-51d557375c0a", }, ], diff --git a/src/entities/ProfileHonorHistory.ts b/src/entities/ProfileHonorHistory.ts index d871738b..4c4c5304 100644 --- a/src/entities/ProfileHonorHistory.ts +++ b/src/entities/ProfileHonorHistory.ts @@ -5,7 +5,6 @@ import { ProfileHonor } from "./ProfileHonor"; @Entity("profileHonorHistory") export class ProfileHonorHistory extends EntityBase { - @Column({ comment: "สถานะการใช้งาน", default: false, @@ -60,13 +59,19 @@ export class ProfileHonorHistory extends EntityBase { }) profileHonorId: string; + @Column({ + nullable: true, + comment: "ประเภทช่วงเวลาการศึกษา", + default: null, + }) + isDate: boolean; + @ManyToOne(() => ProfileHonor, (profileHonor) => profileHonor.profileHonorHistories) @JoinColumn({ name: "profileHonorId" }) histories: ProfileHonor; } export class CreateProfileHonorHistory { - @Column() isActive: boolean; @@ -80,11 +85,14 @@ export class CreateProfileHonorHistory { issuer: string | null; @Column() - refCommandDate: Date | null; + refCommandDate: Date | null; @Column() refCommandNo: string | null; + @Column() + isDate: boolean | null; + @Column("uuid") profileHonorId: string | null; } diff --git a/src/entities/ProfileTrainingHistory.ts b/src/entities/ProfileTrainingHistory.ts index 9c0f7598..fe0e076e 100644 --- a/src/entities/ProfileTrainingHistory.ts +++ b/src/entities/ProfileTrainingHistory.ts @@ -5,7 +5,6 @@ import { ProfileTraining } from "./ProfileTraining"; @Entity("profileTrainingHistory") export class ProfileTrainingHistory extends EntityBase { - @Column({ comment: "สถานะการใช้งาน", default: false, @@ -98,14 +97,20 @@ export class ProfileTrainingHistory extends EntityBase { default: null, }) profileTrainingId: string; - + + @Column({ + nullable: true, + comment: "ประเภทช่วงเวลาการศึกษา", + default: null, + }) + isDate: boolean; + @ManyToOne(() => ProfileTraining, (profileTraining) => profileTraining.profileTrainingHistories) @JoinColumn({ name: "profileTrainingId" }) histories: ProfileTraining; } export class CreateProfileTrainingHistory { - @Column() isActive: boolean; @@ -116,7 +121,7 @@ export class CreateProfileTrainingHistory { endDate: Date | null; @Column() - numberOrder: string | null; + numberOrder: string | null; @Column() topic: string | null; @@ -139,6 +144,9 @@ export class CreateProfileTrainingHistory { @Column() yearly: number | null; + @Column() + isDate: boolean | null; + @Column("uuid") profileTrainingId: string | null; }