Files
Artveris/apps/api/src/auth/dto/login.dto.ts
T
2026-06-28 15:43:18 +08:00

18 lines
434 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, MaxLength, MinLength } from 'class-validator';
export class LoginDto {
@ApiProperty({ description: '用户名', example: 'admin' })
@IsString()
@IsNotEmpty()
@MaxLength(50)
username!: string;
@ApiProperty({ description: '密码', example: 'Admin@12345' })
@IsString()
@IsNotEmpty()
@MinLength(6)
@MaxLength(64)
password!: string;
}