kindergarten/reading-platform-backend/src/modules/auth/dto/login.dto.ts

17 lines
286 B
TypeScript
Raw Normal View History

import { IsString, IsIn, IsNotEmpty } from 'class-validator';
export class LoginDto {
@IsString()
@IsNotEmpty()
account: string;
@IsString()
@IsNotEmpty()
password: string;
@IsString()
@IsIn(['admin', 'school', 'teacher', 'parent'])
@IsNotEmpty()
role: string;
}