53 lines
845 B
TypeScript
53 lines
845 B
TypeScript
import { IsBoolean, IsEmail, IsIn, IsOptional, IsString, IsUUID, MinLength } from 'class-validator';
|
|
|
|
export class ListUserSessionsQuery {
|
|
@IsOptional()
|
|
@IsString()
|
|
page?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
limit?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
keyword?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
state?: string;
|
|
}
|
|
|
|
export class CreateManagedUserDto {
|
|
@IsEmail()
|
|
email!: string;
|
|
|
|
@IsString()
|
|
@MinLength(8)
|
|
password!: string;
|
|
|
|
@IsString()
|
|
name!: string;
|
|
|
|
@IsOptional()
|
|
@IsUUID()
|
|
organizationId?: string | null;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
department?: string | null;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
position?: string | null;
|
|
|
|
@IsOptional()
|
|
@IsIn(['FREE', 'EDU', 'PRO'])
|
|
licenseCode?: 'FREE' | 'EDU' | 'PRO';
|
|
}
|
|
|
|
export class UpdateLmsInstructorDto {
|
|
@IsBoolean()
|
|
isInstructor!: boolean;
|
|
}
|