import { PartialType } from '@nestjs/mapped-types';
import { Transform } from 'class-transformer';
import { IsOptional } from 'class-validator';
import { CreateAppUserDto } from './create-app_user.dto';

export class UpdateAppUserDto extends PartialType(CreateAppUserDto) {
  @IsOptional()
  @Transform(({ value }) => value.trim().replace(/\s+/g, ' '))
  name: string;

  @Transform(({ value }) => value.trim().replace(/\s+/g, ' '))
  email: string;

  @IsOptional()
  profile_picture: string;

  @IsOptional()
  notify: any;
}
