feat(sync): add ImportClassItemDto and expose deptIds in org-tree-with-users

This commit is contained in:
2026-07-09 12:21:39 +08:00
parent e90f73cb60
commit 166066f49f
2 changed files with 68 additions and 6 deletions

View File

@@ -20,9 +20,49 @@ export class ImportUserItemDto {
@IsOptional()
@IsNumber()
roleId: number | null;
@IsArray()
@IsNumber({}, { each: true })
dingDeptIds: number[];
}
export class ImportClassItemDto {
@IsNumber()
deptId: number;
@IsString()
name: string;
@IsString()
code: string;
@IsString()
classType: string;
@IsOptional()
@IsString()
startDate?: string;
@IsOptional()
@IsString()
endDate?: string;
@IsOptional()
@IsNumber()
maxStudents?: number;
@IsOptional()
@IsString()
notes?: string;
}
export class ImportUsersDto {
@IsOptional()
@IsArray()
@ValidateNested({ each: true })
@Type(() => ImportClassItemDto)
classes?: ImportClassItemDto[];
@IsArray()
@ValidateNested({ each: true })
@Type(() => ImportUserItemDto)