# تسک ۰۹: ماژول تنظیمات نوبت‌دهی

## توضیح
پیاده‌سازی سیستم تنظیمات نوبت‌دهی دکتر شامل برنامه هفتگی،
override روزهای خاص و تعطیلات.

## Endpoint ها

| متد | مسیر | توضیح | نیاز به Auth |
|-----|------|-------|-------------|
| POST | `/api/v1/appointment-settings/weekly-schedule` | ایجاد برنامه هفتگی | بله (Doctor) |
| PATCH | `/api/v1/appointment-settings/weekly-schedule/{uuid}` | ویرایش برنامه | بله |
| GET | `/api/v1/appointment-settings/weekly-schedule/{uuid}` | دریافت برنامه | بله |
| DELETE | `/api/v1/booking-setting/{uuid}` | حذف تنظیمات | بله |
| GET | `/api/v1/appointment-settings/date-override/list/{uuid}` | لیست override ها | بله |
| POST | `/api/v1/appointment-settings/date-override` | ایجاد override | بله (Doctor) |
| PATCH | `/api/v1/appointment-settings/date-override/{uuid}` | ویرایش override | بله |
| DELETE | `/api/v1/appointment-settings/date-override/{uuid}` | حذف override | بله |
| GET | `/api/v1/appointment-settings/date-override/{uuid}` | دریافت override | بله |
| POST | `/api/v1/appointment-settings/holidays` | ثبت تعطیلات | بله (Doctor) |
| PATCH | `/api/v1/appointment-settings/holidays/{uuid}` | ویرایش تعطیلات | بله |

## پیش‌نیازها
- تسک ۰۱، ۰۲، ۰۵ (Doctor)

## زمان تخمینی
۱۰ تا ۱۲ ساعت

## نمونه Request

### POST /api/v1/appointment-settings/weekly-schedule
```json
{
  "doctor_uuid": "61be915b-...",
  "schedule": {
    "saturday":  { "active": true,  "slots": [{"start": "09:00", "end": "13:00", "duration": 30}] },
    "sunday":    { "active": true,  "slots": [{"start": "09:00", "end": "13:00", "duration": 30}] },
    "monday":    { "active": false, "slots": [] },
    "tuesday":   { "active": true,  "slots": [{"start": "14:00", "end": "18:00", "duration": 20}] },
    "wednesday": { "active": false, "slots": [] },
    "thursday":  { "active": true,  "slots": [{"start": "09:00", "end": "12:00", "duration": 30}] },
    "friday":    { "active": false, "slots": [] }
  }
}
```

### POST /api/v1/appointment-settings/date-override
```json
{
  "doctor_uuid": "...",
  "date": "2024-03-20",
  "active": false,
  "reason": "مرخصی",
  "custom_slots": []
}
```

### POST /api/v1/appointment-settings/holidays
```json
{
  "doctor_uuid": "...",
  "start_date": "2024-03-20",
  "end_date": "2024-03-27",
  "reason": "نوروز"
}
```
