forked from Shared/esg
16 lines
343 B
TypeScript
16 lines
343 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsNotEmpty, IsString, MinLength } from 'class-validator';
|
|
|
|
export class LoginDto {
|
|
@ApiProperty({ example: 'admin' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
username!: string;
|
|
|
|
@ApiProperty({ example: 'SecureP@ssw0rd' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@MinLength(8)
|
|
password!: string;
|
|
}
|