import datetime
from typing import Optional

from pydantic import BaseModel

from app.domain.entities.appointment_type import AppointmentTypeEntity
from app.domain.entities.patient import PatientEntity
from app.domain.entities.user import UserEntity


class ScheduledAppointmentEntity(BaseModel):
    id: Optional[int] = None
    scheduled_datetime: datetime.datetime
    is_canceled: Optional[bool] = False

    patient_id: int
    doctor_id: Optional[int] = None
    type_id: int

    patient: Optional[PatientEntity] = None
    doctor: Optional[UserEntity] = None
    type: Optional[AppointmentTypeEntity] = None
