import {
  IsEmail,
  IsOptional,
  IsString,
  MaxLength,
  MinLength,
} from 'class-validator';

export class UpdateMyProfileDto {
  @IsOptional()
  @IsString()
  @MinLength(2, { message: 'Name must be at least 2 characters' })
  name?: string;

  @IsOptional()
  @IsEmail()
  email?: string;

  /** Another user's referralCode, applied once at onboarding (customer app). */
  @IsOptional()
  @IsString()
  @MaxLength(40)
  referrerCode?: string;
}
