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

@@ -42,9 +42,6 @@ export class StudentsService {
const entity = this.repo.create(dto);
if (dto.departmentId) {
entity.departmentId = dto.departmentId;
} else if (dto.classId) {
const cls = await this.classRepo.findOne({ where: { id: dto.classId } });
if (cls) entity.departmentId = cls.departmentId;
}
return this.repo.save(entity);
}