fix: remove null union types causing TypeORM Object inference on Deposit columns

This commit is contained in:
2026-07-05 20:58:49 +08:00
parent f7cb7a9599
commit 6d589f6faa

View File

@@ -47,16 +47,16 @@ export class Deposit {
recordedBy: number;
@Column({ name: 'refund_status', length: 30, nullable: true })
refundStatus: string | null; // pending | head_teacher_approved | finance_approved | refunded
refundStatus: string; // pending | head_teacher_approved | finance_approved | refunded
@Column({ name: 'refund_requested_at', type: 'datetime', nullable: true })
refundRequestedAt: Date | null;
refundRequestedAt: Date;
@Column({ name: 'refund_approved_by', type: 'integer', nullable: true })
refundApprovedBy: number | null;
refundApprovedBy: number;
@Column({ name: 'refund_approved_at', type: 'datetime', nullable: true })
refundApprovedAt: Date | null;
refundApprovedAt: Date;
@OneToMany(() => DepositInstallment, (i) => i.deposit, { cascade: true, eager: true })
installments: DepositInstallment[];