feat: auto-populate department_id on create + seed default campus with backfill

This commit is contained in:
2026-07-06 00:05:00 +08:00
parent cd6364268d
commit df61ebbc5b
16 changed files with 130 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
import { IsString, IsOptional, IsEnum, IsNumber } from 'class-validator';
import { IsString, IsOptional, IsEnum, IsNumber, IsInt } from 'class-validator';
export class CreateStudentDto {
@IsString()
@@ -39,6 +39,13 @@ export class CreateStudentDto {
@IsOptional()
@IsString()
supervisor?: string;
@IsOptional()
@IsInt()
departmentId?: number;
@IsOptional()
@IsInt()
classId?: number;
}
export class UpdateStudentDto {