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

export class UpdateProfileDto {
  @IsOptional()
  @IsString()
  @MaxLength(200)
  companyName?: string;

  @IsOptional()
  @IsEmail()
  @MaxLength(150)
  companyEmail?: string;

  @IsOptional()
  @IsString()
  @MaxLength(20)
  companyPhone?: string;

  @IsOptional()
  @IsString()
  @MaxLength(32)
  companyLocation?: string;

  @IsOptional()
  @IsString()
  companyAddress?: string;

  @IsOptional()
  @IsString()
  @Length(10, 10)
  @Matches(/^\d+$/, { message: 'TIN must contain only digits' })
  tin?: string;

  @IsOptional()
  @IsString()
  @MaxLength(50)
  vatNumber?: string;

  @IsOptional()
  @IsString()
  @MaxLength(16)
  fanNumber?: string;

  @IsOptional()
  @IsString()
  contactPersonName?: string;

  @IsOptional()
  @IsString()
  contactPersonPhone?: string;

  @IsOptional()
  @IsString()
  generalManagerName?: string;

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

  @IsOptional()
  @IsString()
  generalManagerPhone?: string;

  @IsOptional()
  @IsString()
  poaName?: string;

  @IsOptional()
  @IsString()
  poaPhone?: string;

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

  @IsOptional()
  @IsString()
  poaLocation?: string;

  @IsOptional()
  @IsString()
  poaAddress?: string;
}
