import { IsString, IsNotEmpty, IsOptional, IsEmail, MaxLength, IsBoolean, IsEnum } from 'class-validator';
import { CompanyType } from '../entities/company.entity';

export class CreateCompanyWithProfileDto {
  @IsEnum(CompanyType)
  companyType!: CompanyType;

  @IsString()
  @IsNotEmpty()
  @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()
  @MaxLength(10)
  tin?: string;

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

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

  @IsOptional()
  @IsString()
  @MaxLength(100)
  jobTitle?: string;

  @IsOptional()
  @IsBoolean()
  isPrimaryContact?: boolean;

  @IsOptional()
  attributes?: Record<string, any>;
}
