feat: 实现登录鉴权 RBAC 与用户管理模块
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user