refactor: remove User-based import and RBAC UserDingMapping endpoints
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
import {
|
||||
IsArray,
|
||||
IsString,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
export class ImportUserItemDto {
|
||||
@IsString()
|
||||
dingUserId: string;
|
||||
|
||||
@IsString()
|
||||
name: string;
|
||||
|
||||
@IsString()
|
||||
mobile: string;
|
||||
|
||||
@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)
|
||||
users: ImportUserItemDto[];
|
||||
}
|
||||
Reference in New Issue
Block a user