import { ApiProperty } from '@nestjs/swagger'; import { IsEmail, IsString, MinLength } from 'class-validator'; export class CreateUserDto { @ApiProperty() @IsEmail() email!: string; @ApiProperty() @IsString() @MinLength(8) password!: string; @ApiProperty() @IsString() name!: string; @ApiProperty({ description: 'Id of an active Role' }) @IsString() @MinLength(1) roleId!: string; }