refactor: 重构 schemas 结构,统一枚举定义
This commit is contained in:
@@ -28,10 +28,10 @@ Base URL: `/api/v1/schedule-items`
|
||||
| 值 | 说明 |
|
||||
|---|---|
|
||||
| `active` | 进行中 |
|
||||
| `completed` | 已完成 |
|
||||
| `canceled` | 已取消 |
|
||||
| `archived` | 已归档 |
|
||||
|
||||
兼容策略:历史数据中若存在 `completed` 或 `canceled`,服务端统一按 `archived` 语义处理;新写入仅允许 `active` 或 `archived`。
|
||||
|
||||
### ScheduleItemSourceType
|
||||
|
||||
| 值 | 说明 |
|
||||
@@ -96,7 +96,7 @@ Base URL: `/api/v1/schedule-items`
|
||||
"end_at": "datetime | null (必须包含时区)",
|
||||
"timezone": "string | null (IANA 时区)",
|
||||
"metadata": "ScheduleItemMetadata | null",
|
||||
"status": "ScheduleItemStatus | null"
|
||||
"status": "ScheduleItemStatus | null (active | archived)"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -116,7 +116,7 @@ Base URL: `/api/v1/schedule-items`
|
||||
"source_type": "ScheduleItemSourceType",
|
||||
"created_at": "datetime",
|
||||
"updated_at": "datetime",
|
||||
"permission": "int",
|
||||
"permission": "int (位掩码: 1=view, 2=invite, 4=edit)",
|
||||
"is_owner": "boolean"
|
||||
}
|
||||
```
|
||||
@@ -132,6 +132,11 @@ Base URL: `/api/v1/schedule-items`
|
||||
}
|
||||
```
|
||||
|
||||
说明:`permission_view`、`permission_edit`、`permission_invite` 为布尔值,内部会转换为位掩码整数:
|
||||
- `permission_view = 1`
|
||||
- `permission_invite = 2`
|
||||
- `permission_edit = 4`
|
||||
|
||||
### ScheduleItemShareResponse
|
||||
|
||||
```json
|
||||
|
||||
Reference in New Issue
Block a user