refactor: remove departmentId from Class entity

This commit is contained in:
2026-07-09 17:32:37 +08:00
parent 40fef906cd
commit 22bc1876d8
9 changed files with 4 additions and 116 deletions

View File

@@ -52,9 +52,6 @@ export class SchedulesService {
const schedule = this.scheduleRepo.create(dto);
if (dto.departmentId) {
schedule.departmentId = dto.departmentId;
} else if (dto.classId) {
const cls = await this.classRepo.findOne({ where: { id: dto.classId } });
if (cls) schedule.departmentId = cls.departmentId;
}
const saved = await this.scheduleRepo.save(schedule);
return this.findOne(saved.id);