import { IsEmail, IsEnum, IsOptional, IsString, MinLength } from 'class-validator';
import { ErrorCode } from '../../../common/errors';

export class CreateOrganizationDto {
  @IsString()
  @MinLength(2, { message: ErrorCode.VALIDATION_ORGANIZATION_NAME_REQUIRED })
  organizationName: string;

  @IsEmail({}, { message: ErrorCode.VALIDATION_EMAIL_INVALID })
  organizationEmail: string;

  @IsEnum(['CLINIC', 'LAB'], { message: ErrorCode.VALIDATION_ORGANIZATION_TYPE_INVALID })
  organizationType: 'CLINIC' | 'LAB';

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