feat(appointment): derive service section from service item when missing in appointment

This commit is contained in:
hamed
2026-08-08 07:14:40 +03:30
parent da07e3ad9c
commit b699476305
5 changed files with 144 additions and 22 deletions
+7
View File
@@ -390,6 +390,13 @@ Get appointment detail.
**Permission:** `AUTH` — see [Single-appointment access model](#single-appointment-access-model)
> **`service_section` اینجا استنتاجی است.** نوبتِ سرویسیِ کلینیک بخش را روی خودِ نوبت
> ذخیره نمی‌کند و فقط سرویس را نگه می‌دارد. این اندپوینت — و **فقط** این اندپوینت — وقتی
> `service_section` خالی باشد آن را از `service_item` درمی‌آورد. حدس نیست:
> `service_items.section_id` ستونی `NOT NULL` است، پس هر سرویسی دقیقاً یک بخش دارد.
> نوبتِ بدون هیچ سرویسی همچنان `null` می‌گیرد. فهرست‌ها (`GET /api/v1/appointments…`)
> عمداً این استنتاج را ندارند و رفتارشان تغییر نکرده.
### Path Parameters
| Param | Type | Description |
|-------|------|-------------|