import { IsNotEmpty, ValidateNested, IsEmail, IsOptional, IsString } from 'class-validator' import { Type } from 'class-transformer' import { CountryCode, Timezone } from '../../../../utils/countries' export class NutritionistAttributes { @IsNotEmpty() document_number: string @IsNotEmpty() @IsEmail() email: string @IsNotEmpty() name: string @IsNotEmpty() whatsapp: string @IsNotEmpty() password: string @IsNotEmpty() professional_document: string @IsNotEmpty() is_definitive: boolean @IsString() @IsNotEmpty() timezone: Timezone @IsString() @IsNotEmpty() country_code: CountryCode @IsOptional() bio: string @IsOptional() users_restrictions: Array @IsOptional() users_goals: Array @IsOptional() instagram: string @IsOptional() linkedin: string @IsOptional() photo_url: string } export class SignUpInput { @IsNotEmpty() @ValidateNested() @Type(() => NutritionistAttributes) readonly user: NutritionistAttributes } export class SignUpParams { @IsNotEmpty() @ValidateNested() @Type(() => SignUpInput) readonly input: SignUpInput }