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

@ -41,7 +41,7 @@ export class ProfileDiscipline extends EntityBase {
default: null,
})
detail: string;
@Column({
nullable: true,
type: "datetime",
@ -66,7 +66,10 @@ export class ProfileDiscipline extends EntityBase {
})
unStigma: string;
@OneToMany(() => ProfileDisciplineHistory, (profileDisciplineHistory) => profileDisciplineHistory.histories)
@OneToMany(
() => ProfileDisciplineHistory,
(profileDisciplineHistory) => profileDisciplineHistory.histories,
)
profileDisciplineHistories: ProfileDisciplineHistory[];
@ManyToOne(() => Profile, (profile) => profile.profileDiscipline)
@ -75,30 +78,23 @@ export class ProfileDiscipline extends EntityBase {
}
export class CreateProfileDiscipline {
@Column()
date: Date | null;
@Column()
profileId: string;
@Column()
isActive: boolean | null;
@Column()
level: string | null;
@Column()
level: string | null;
detail: string | null;
@Column()
refCommandDate: Date | null;
@Column()
refCommandNo: string | null;
@Column()
unStigma: string | null;
}
export type UpdateProfileDiscipline = Partial<CreateProfileDiscipline>;
export type UpdateProfileDiscipline = {
date?: Date | null;
profileId: string;
isActive: boolean | null;
level: string | null;
detail: string | null;
refCommandDate?: Date | null;
refCommandNo: string | null;
unStigma: string | null;
};