- reading-platform-backend:NestJS 后端 - reading-platform-frontend:Vue3 前端 - reading-platform-java:Spring Boot 服务端
17 lines
286 B
TypeScript
17 lines
286 B
TypeScript
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;
|
|
}
|