import { ApiProperty } from '@nestjs/swagger';
import { Exclude, Expose } from 'class-transformer';
import { AppointmentStatus } from 'common/enum/appointment.enum';

@Exclude()
export class AppointmentResponseDto {
  @ApiProperty({
    example: 1,
    description: 'Appointment ID',
  })
  @Expose()
  id: number;

  @ApiProperty({
    example: 'John Doe',
    description: 'Full name of the person associated with the appointment',
  })
  @Expose()
  fullName: string;

  @ApiProperty({
    example: 'Cybersecurity Consultation',
    description: 'Title of the appointment',
  })
  @Expose()
  title: string;

  @ApiProperty({
    example: '2025-02-24',
    description: 'Date of the appointment',
  })
  @Expose()
  appointmentDate: Date;

  @ApiProperty({
    example: '14:00:00',
    description: 'Time of the appointment',
  })
  @Expose()
  appointmentTime: string;

  @ApiProperty({
    example: 30,
    description: 'Duration of the appointment in minutes',
  })
  @Expose()
  duration: number;

  @ApiProperty({
    example: AppointmentStatus.PENDING,
    description: 'Current status of the appointment',
  })
  @Expose()
  status: AppointmentStatus;

  @ApiProperty({
    example: 'Patient needs to bring medical reports.',
    description: 'Notes related to the appointment',
  })
  @Expose()
  notes: string;

  @ApiProperty({
    example: 123,
    description: 'User ID of the person associated with the appointment',
  })
  @Expose()
  userId: number;

  @ApiProperty({
    example: 1234567890,
    description: 'Phone number of the person associated with the appointment',
  })
  @Expose()
  phone?: number;

  @ApiProperty({
    example: '2025-01-15T12:30:00.000Z',
    description: 'Creation date of the appointment',
  })
  @Expose()
  createdAt: Date;

  @ApiProperty({
    example: '2025-01-16T12:30:00.000Z',
    description: 'Last updated date of the appointment',
  })
  @Expose()
  updatedAt: Date;
}
