refactor: resolve remaining field audit issues

This commit is contained in:
2026-07-13 15:12:36 +08:00
parent 0533c30ece
commit aa1ed7db56
34 changed files with 953 additions and 263 deletions

View File

@@ -11,6 +11,12 @@ import {
import { Classroom } from './classroom.entity';
import { Organization } from './organization.entity';
export enum ClassroomRentalStatus {
ACTIVE = 'active',
ENDED = 'ended',
CANCELLED = 'cancelled',
}
@Entity('classroom_rentals')
@Index(['classroomId', 'startDate', 'endDate'])
export class ClassroomRental {
@@ -57,8 +63,8 @@ export class ClassroomRental {
@Column({ name: 'total_amount', type: 'decimal', precision: 10, scale: 2, nullable: true })
totalAmount: number;
@Column({ type: 'varchar', length: 20, default: 'active' })
status: string; // active / ended / cancelled
@Column({ type: 'varchar', length: 20, default: ClassroomRentalStatus.ACTIVE })
status: ClassroomRentalStatus | 'active' | 'ended' | 'cancelled';
@Column({ type: 'text', nullable: true })
notes: string;