Files
yuyueguahao/docs/api/v1/doctor.md
T
2026-07-05 14:43:34 +08:00

40 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Doctor · 医生
## 接口表
| Method | Path | 鉴权 | 说明 |
|---|---|---|---|
| GET | `/api/v1/doctors` | - | 医生列表 |
| GET | `/api/v1/doctors/:id` | - | 医生详情 |
| POST | `/api/v1/doctors/admin` | ✅ | 新增 |
| PUT | `/api/v1/doctors/admin/:id` | ✅ | 更新 |
| DELETE | `/api/v1/doctors/admin/:id` | ✅ | 删除 |
## GET /api/v1/doctors
**Query 参数**
- `departmentId` (string) - 按科室 ID
- `departmentName` (string) - 按科室名
- `enabled` (string) - 'true' / 'false'
**响应** - `data` 是 `Doctor[]`
## Doctor 字段
| 字段 | 类型 | 说明 |
|---|---|---|
| id | string | 医生 ID |
| name | string | 姓名 |
| title | string | 职称 |
| departmentId | string \| null | 所属科室 ID |
| departmentName | string \| null | 所属科室名 |
| avatar | string | 头像 URL |
| specialty | string | 专长 |
| intro | string | 简介 |
| fee | number | 挂号费 |
| rating | number | 评分 |
| availableDates | string[] | 可预约日期(ISO) |
| enabled | boolean | 启用状态 |
| createdAt | string | ISO datetime |
| updatedAt | string | ISO datetime |