feat(clinic): enhance clinic listing with additional details and address information
- Updated the clinic API response to include new fields: title, phone, logo, images_clinic, doctors_count, city, state, 24_7, and field_working_days. - Modified the ClinicController to fetch and include city and state information based on the clinic's address. - Refactored the toListArray method in the Clinic entity to accept city and state parameters. - Added a new method in the ClinicRepository to retrieve city and province names for each clinic based on their address.
This commit is contained in:
+23
-2
@@ -192,11 +192,23 @@ List clinics with pagination.
|
||||
"success": true,
|
||||
"data": [
|
||||
{
|
||||
"id": "3426",
|
||||
"uuid": "...",
|
||||
"name": "کلینیک الوند",
|
||||
"title": "کلینیک الوند",
|
||||
"phone": "02112345678",
|
||||
"phone_number": "02112345678",
|
||||
"logo": "/uploads/clinics/logo/...",
|
||||
"clinic_logo": "/uploads/clinics/logo/...",
|
||||
"images_clinic": [{ "url": "/uploads/clinics/gallery/..." }],
|
||||
"doctors_count": 4,
|
||||
"is_active": true,
|
||||
"created_at": 1781762386,
|
||||
"city": "تهران",
|
||||
"clinic_logo": "https://...",
|
||||
"is_active": true
|
||||
"state": "تهران",
|
||||
"specialties": [{ "uuid": "...", "id": "7", "name": "..." }],
|
||||
"24_7": false,
|
||||
"field_working_days": "شنبه تا پنجشنبه ۸ تا ۲۰"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
@@ -207,6 +219,15 @@ List clinics with pagination.
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `clinic_logo` / `logo` | string\|null | Logo path (relative `/uploads/...` or absolute URL) |
|
||||
| `doctors_count` | integer | Number of doctors linked to the clinic |
|
||||
| `city` | string\|null | City name, resolved from the clinic's address (`DoctorAddress`) |
|
||||
| `state` | string\|null | Province name, resolved from the clinic's address (`DoctorAddress`) |
|
||||
| `24_7` | boolean | Open 24/7 flag |
|
||||
| `field_working_days` | string\|null | Working days/hours description |
|
||||
|
||||
---
|
||||
|
||||
## GET `/api/v1/clinic/doctor-list/{clinicUuid}`
|
||||
|
||||
Reference in New Issue
Block a user