feat: new classrooms default to 'reserved' status instead of 'available'

This commit is contained in:
2026-07-06 15:26:35 +08:00
parent 72b0eed36e
commit 1c097dc230
3 changed files with 4 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ export class ClassroomsService {
async restore(id: number) {
await this.findOne(id);
await this.repo.update(id, { status: 'available' });
await this.repo.update(id, { status: 'reserved' });
return this.repo.findOne({ where: { id } });
}

View File

@@ -27,7 +27,7 @@ export class Classroom {
@Column({ length: 50, nullable: true })
supervisor: string;
@Column({ type: 'varchar', length: 20, default: 'available' })
@Column({ type: 'varchar', length: 20, default: 'reserved' })
status: string;
@Column({ type: 'text', nullable: true })