feat: enhance doctor address management by including clinic addresses and enforcing required fields
This commit is contained in:
+30
-6
@@ -274,7 +274,7 @@ Upload doctor profile image.
|
||||
|
||||
## GET `/api/v1/clinic-pro/doctor-addresses/{doctorId}`
|
||||
|
||||
Get all practice addresses for a doctor.
|
||||
Get all practice addresses for a doctor, including addresses of clinics the doctor is a member of.
|
||||
|
||||
**Permission:** `PUBLIC`
|
||||
|
||||
@@ -289,17 +289,37 @@ Get all practice addresses for a doctor.
|
||||
"success": true,
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"id": "1",
|
||||
"uuid": "...",
|
||||
"type": "personal",
|
||||
"clinic_id": null,
|
||||
"clinic_name": null,
|
||||
"name": "مطب تهران",
|
||||
"address": "تهران، خیابان...",
|
||||
"telephone": "02112345678",
|
||||
"latitude": 35.6892,
|
||||
"longitude": 51.3890
|
||||
"map": { "latitude": "35.6892", "longitude": "51.3890" },
|
||||
"city": { "id": "1", "name": "تهران" },
|
||||
"province": { "id": "1", "name": "تهران" }
|
||||
},
|
||||
{
|
||||
"id": "5",
|
||||
"uuid": "...",
|
||||
"type": "clinic",
|
||||
"clinic_id": 12,
|
||||
"clinic_name": "کلینیک الوند",
|
||||
"name": null,
|
||||
"address": "اصفهان، خیابان...",
|
||||
"telephone": "03112345678",
|
||||
"map": { "latitude": null, "longitude": null },
|
||||
"city": { "id": "3", "name": "اصفهان" },
|
||||
"province": { "id": "2", "name": "اصفهان" }
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
> **نکته:** آدرسهای با `type: "clinic"` از کلینیکهایی که پزشک عضو آنهاست میآیند و `clinic_name` نام کلینیک را نشان میدهد.
|
||||
|
||||
---
|
||||
|
||||
## POST `/api/v1/clinic-pro/doctor-address`
|
||||
@@ -314,6 +334,8 @@ Add a new practice address.
|
||||
"name": "مطب تهران",
|
||||
"address": "تهران، خیابان ولیعصر",
|
||||
"telephone": "02112345678",
|
||||
"province_id": 1,
|
||||
"city_id": 3,
|
||||
"latitude": 35.6892,
|
||||
"longitude": 51.3890
|
||||
}
|
||||
@@ -322,8 +344,10 @@ Add a new practice address.
|
||||
| Field | Type | Required |
|
||||
|-------|------|----------|
|
||||
| `name` | string | ❌ |
|
||||
| `address` | string | ❌ |
|
||||
| `telephone` | string | ❌ |
|
||||
| `address` | string | ✅ (frontend validation) |
|
||||
| `telephone` | string | ✅ (frontend validation) |
|
||||
| `province_id` | integer | ✅ (frontend validation) |
|
||||
| `city_id` | integer | ✅ (frontend validation) |
|
||||
| `latitude` | float | ❌ |
|
||||
| `longitude` | float | ❌ |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user