forked from wangziqi/gongxue-base
refactor: resolve remaining field audit issues
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user