import { ApiProperty } from '@nestjs/swagger';
import { IsEmail, IsInt, IsOptional, IsString } from 'class-validator';

export class SingUpUserDto {
  @ApiProperty()
    @IsString()
    username: string;
  
    @ApiProperty()
    @IsEmail()
    email: string;
  
    @ApiProperty()
    @IsString()
    fullname: string;
  
    @ApiProperty()
    @IsString({
      message: 'Phone must be a string',
    })
    @IsOptional()
    phone: string;
  
    @ApiProperty()
    @IsString({
      message: 'Password must be a string',
    })
    password: string;

    @ApiProperty()
    @IsInt()
    state: number;

    @ApiProperty()
    @IsInt()
    municipality: number;

    @ApiProperty()
    @IsInt()
    parish: number;
  
    @ApiProperty()
    @IsInt()
    role: number;
}
