feat: clinic doc api
This commit is contained in:
@@ -116,7 +116,6 @@ class ClinicDoctorBase(BaseModel):
|
||||
name: str
|
||||
role: ClinicDoctorType
|
||||
status: ClinicDoctorStatus
|
||||
clinic_id: int
|
||||
|
||||
|
||||
class CallTranscriptsBase(BaseModel):
|
||||
|
||||
@@ -54,8 +54,10 @@ class UserCreate(BaseModel):
|
||||
clinic: ClinicBase
|
||||
|
||||
|
||||
class ClinicDoctorCreate(ClinicDoctorBase):
|
||||
pass
|
||||
class ClinicDoctorCreate(BaseModel):
|
||||
name: str
|
||||
role: ClinicDoctorType
|
||||
appointmentTypes: list[int]
|
||||
|
||||
|
||||
class CallTranscriptsCreate(CallTranscriptsBase):
|
||||
|
||||
+13
-10
@@ -5,6 +5,7 @@ from enums.enums import ClinicStatus
|
||||
from .BaseSchemas import *
|
||||
from pydantic import Field
|
||||
|
||||
|
||||
# Response schemas (used for API responses)
|
||||
class Clinic(ClinicBase):
|
||||
id: int
|
||||
@@ -151,15 +152,6 @@ class AppointmentDetailed(AppointmentSchema):
|
||||
patient: Patient
|
||||
|
||||
|
||||
class ClinicDoctorResponse(ClinicDoctorBase):
|
||||
id: int
|
||||
create_time: datetime
|
||||
update_time: datetime
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
|
||||
class CallTranscriptsResponse(CallTranscriptsBase):
|
||||
id: int
|
||||
create_time: datetime
|
||||
@@ -187,6 +179,18 @@ class MasterAppointmentTypeResponse(MasterAppointmentTypeBase):
|
||||
orm_mode = True
|
||||
|
||||
|
||||
class ClinicDoctorResponse(ClinicDoctorBase):
|
||||
id: int
|
||||
create_time: datetime
|
||||
update_time: datetime
|
||||
appointmentTypes: Optional[List[MasterAppointmentTypeResponse]] = []
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
from_attributes = True
|
||||
allow_population_by_field_name = True
|
||||
|
||||
|
||||
class ClinicOfferResponse(ClinicOffersBase):
|
||||
id: int
|
||||
create_time: datetime
|
||||
@@ -194,4 +198,3 @@ class ClinicOfferResponse(ClinicOffersBase):
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
@@ -75,5 +75,8 @@ class UserUpdate(BaseModel):
|
||||
password: Optional[str] = None
|
||||
|
||||
|
||||
class ClinicDoctorUpdate(ClinicDoctorBase):
|
||||
pass
|
||||
class ClinicDoctorUpdate(BaseModel):
|
||||
name: Optional[str] = None
|
||||
role: Optional[ClinicDoctorType] = None
|
||||
status: Optional[ClinicDoctorStatus] = None
|
||||
appointmentTypes: Optional[list[int]] = None
|
||||
|
||||
Reference in New Issue
Block a user