fix: เเก้ รับ date null

This commit is contained in:
Net 2024-03-18 17:23:59 +07:00
parent 9b0a5e9194
commit 169fada8ae
5 changed files with 80 additions and 106 deletions

View file

@ -104,8 +104,11 @@ export class ProfileTraining extends EntityBase {
default: null,
})
isDate: boolean;
@OneToMany(() => ProfileTrainingHistory, (profileTrainingHistory) => profileTrainingHistory.histories)
@OneToMany(
() => ProfileTrainingHistory,
(profileTrainingHistory) => profileTrainingHistory.histories,
)
profileTrainingHistories: ProfileTrainingHistory[];
@ManyToOne(() => Profile, (profile) => profile.profileTrainings)
@ -114,44 +117,33 @@ export class ProfileTraining extends EntityBase {
}
export class CreateProfileTraining {
@Column("uuid")
profileId: string | null;
@Column()
isActive: boolean;
@Column()
startDate: Date | null;
@Column()
endDate: Date | null;
@Column()
numberOrder: string | null;
@Column()
numberOrder: string | null;
topic: string | null;
@Column()
place: string | null;
@Column()
dateOrder: Date | null;
@Column()
department: string | null;
@Column()
duration: string | null;
@Column()
name: string | null;
@Column()
yearly: number | null;
@Column()
isDate: boolean | null;
}
export type UpdateProfileTraining = Partial<CreateProfileTraining>;
export type UpdateProfileTraining = {
profileId: string | null;
isActive: boolean;
startDate?: Date | null;
endDate?: Date | null;
numberOrder: string | null;
topic: string | null;
place: string | null;
dateOrder?: Date | null;
department: string | null;
duration: string | null;
name: string | null;
yearly: number | null;
isDate: boolean | null;
};