create-hest-app
Version:
Create HestJS-powered applications with one command
65 lines (55 loc) • 1.35 kB
text/typescript
import {
IsEmail,
IsNumber,
IsOptional,
IsString,
Length,
Max,
Min,
} from '@hestjs/validation';
/**
* 创建用户 DTO
*/
export class CreateUserDto {
name!: string;
email!: string;
age!: number;
password!: string;
bio?: string;
}
/**
* 更新用户 DTO
*/
export class UpdateUserDto {
name?: string;
email?: string;
age?: number;
bio?: string;
}