16 lines
317 B
TypeScript
16 lines
317 B
TypeScript
|
|
import { IsString, IsNotEmpty, IsOptional } from 'class-validator';
|
||
|
|
|
||
|
|
export class LoginDto {
|
||
|
|
@IsString()
|
||
|
|
@IsNotEmpty()
|
||
|
|
username: string;
|
||
|
|
|
||
|
|
@IsString()
|
||
|
|
@IsNotEmpty()
|
||
|
|
password: string;
|
||
|
|
|
||
|
|
@IsString()
|
||
|
|
@IsOptional()
|
||
|
|
tenantCode?: string; // 租户编码(可选,如果未提供则从请求头获取)
|
||
|
|
}
|