fix: เเก้ รับ date null
This commit is contained in:
parent
9b0a5e9194
commit
169fada8ae
5 changed files with 80 additions and 106 deletions
|
|
@ -22,11 +22,11 @@ export class ProfileAssessment extends EntityBase {
|
|||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อแบบประเมิน",
|
||||
type: "text",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
|
|
@ -83,7 +83,10 @@ export class ProfileAssessment extends EntityBase {
|
|||
})
|
||||
pointSumTotal: number;
|
||||
|
||||
@OneToMany(() => ProfileAssessmentHistory, (profileAssessmentHistory) => profileAssessmentHistory.histories)
|
||||
@OneToMany(
|
||||
() => ProfileAssessmentHistory,
|
||||
(profileAssessmentHistory) => profileAssessmentHistory.histories,
|
||||
)
|
||||
profileAssessmentHistorys: ProfileAssessmentHistory[];
|
||||
|
||||
@ManyToOne(() => Profile, (profile) => profile.profileAssessments)
|
||||
|
|
@ -92,35 +95,27 @@ export class ProfileAssessment extends EntityBase {
|
|||
}
|
||||
|
||||
export class CreateProfileAssessment {
|
||||
@Column("uuid")
|
||||
profileId: string | null;
|
||||
|
||||
@Column()
|
||||
isActive: boolean;
|
||||
|
||||
@Column()
|
||||
name: string | null;
|
||||
|
||||
@Column()
|
||||
date: Date | null;
|
||||
|
||||
@Column()
|
||||
point1: number | null;
|
||||
|
||||
@Column()
|
||||
point1Total: number | null;
|
||||
|
||||
@Column()
|
||||
point2: number | null;
|
||||
|
||||
@Column()
|
||||
point2Total: number | null;
|
||||
|
||||
@Column()
|
||||
pointSum: number | null;
|
||||
|
||||
@Column()
|
||||
pointSumTotal: number | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileAssessment = Partial<CreateProfileAssessment>;
|
||||
export type UpdateProfileAssessment = {
|
||||
profileId: string | null;
|
||||
isActive: boolean;
|
||||
name: string | null;
|
||||
date?: Date | null;
|
||||
point1: number | null;
|
||||
point1Total: number | null;
|
||||
point2: number | null;
|
||||
point2Total: number | null;
|
||||
pointSum: number | null;
|
||||
pointSumTotal: number | null;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue