import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"
import {
  IsBoolean,
  IsEmail,
  IsInt,
  IsOptional,
  IsString,
} from "class-validator"

export class CreateHospitalContactDto {
  @ApiProperty({ example: "Dr. John Doe" })
  @IsString()
  @IsOptional()
  name: string

  @ApiPropertyOptional({ example: "Head of Surgery" })
  @IsString()
  @IsOptional()
  position?: string

  @ApiPropertyOptional({ example: "Surgery" })
  @IsString()
  @IsOptional()
  department?: string

  @ApiProperty({ example: "john.doe@example.com" })
  @IsEmail({}, { message: "email must be a valid email address" })
  @IsOptional()
  email: string

  @ApiProperty({ example: "+91" })
  @IsString()
  @IsOptional()
  country_code: string

  @ApiProperty({ example: "+800-123-4567" })
  @IsString()
  @IsOptional()
  phone_number: string

  @ApiProperty({ example: true })
  @IsBoolean()
  @IsOptional()
  is_primary: boolean

  @ApiProperty({ example: 1 })
  @IsInt()
  @IsOptional()
  hospital_id: number
}
