import { ApiProperty } from '@nestjs/swagger';
import { IsDateString, IsString, IsUUID, MaxLength } from 'class-validator';

export class CreateAppointmentDto {
  @ApiProperty()
  @IsUUID()
  patientId: string;

  @ApiProperty({ description: 'Staff user id (column provider)' })
  @IsUUID()
  providerUserId: string;

  @ApiProperty({ example: '2026-05-06T09:15:00.000Z' })
  @IsDateString()
  startAt: string;

  @ApiProperty({ example: '2026-05-06T09:45:00.000Z' })
  @IsDateString()
  endAt: string;

  @ApiProperty({
    description: 'Treatment type code from the treatment catalog',
    example: 'consultation',
  })
  @IsString()
  @MaxLength(64)
  purpose: string;
}
