import { IsEmail, IsNotEmpty, IsOptional, IsString, MinLength } from 'class-validator';
/**
* @swagger
* components:
* schemas:
* CreateUserDto:
* type: object
* required:
* - email
* - password
* - name
* properties:
* email:
* type: string
* format: email
* password:
* type: string
* minLength: 6
* name:
* type: string
* pictureUrl:
* type: string
*/
export class CreateUserDto {
@IsEmail()
@IsNotEmpty()
email!: string;
@IsString()
@MinLength(6)
@IsNotEmpty()
password!: string;
@IsString()
@IsNotEmpty()
name!: string;
@IsString()
@IsOptional()
pictureUrl?: string;
}
/**
* @swagger
* components:
* schemas:
* UpdateUserDto:
* type: object
* properties:
* email:
* type: string
* format: email
* password:
* type: string
* minLength: 6
* name:
* type: string
* pictureUrl:
* type: string
*/
export class UpdateUserDto {
@IsEmail()
@IsOptional()
email?: string;
@IsString()
@MinLength(6)
@IsOptional()
password?: string;
@IsString()
@IsOptional()
name?: string;
@IsString()
@IsOptional()
pictureUrl?: string;
}