fix: ลบ isActive

This commit is contained in:
Net 2024-03-21 14:11:53 +07:00 committed by Methapon2001
parent c13ca10a3e
commit 23f8382928
18 changed files with 36 additions and 165 deletions

View file

@ -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<CreateProfileCertificateHistory>;