feat: add batch-import students to class endpoint
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IsOptional, IsString, IsNotEmpty, IsInt, IsArray, IsDateString, IsEnum } from 'class-validator';
|
||||
import { IsOptional, IsString, IsNotEmpty, IsInt, IsArray, IsDateString, IsEnum, ArrayNotEmpty } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ClassType, ClassStatus, TeacherRoleType } from '../../entities';
|
||||
|
||||
@@ -43,6 +43,11 @@ export class CreateClassDto {
|
||||
studentIds?: number[];
|
||||
|
||||
@IsOptional() @IsArray()
|
||||
|
||||
@IsArray()
|
||||
@IsString({ each: true })
|
||||
@IsOptional()
|
||||
dingUserIds?: string[];
|
||||
teachers?: Array<{ userId: number; roleType: string; subject?: string }>;
|
||||
}
|
||||
|
||||
@@ -135,3 +140,10 @@ export class QueryClassAttendanceSummaryDto {
|
||||
@IsOptional() @IsDateString()
|
||||
endDate?: string;
|
||||
}
|
||||
|
||||
export class BatchImportStudentsDto {
|
||||
@IsArray()
|
||||
@IsString({ each: true })
|
||||
@ArrayNotEmpty()
|
||||
dingUserIds: string[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user