This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
## What Changes
|
||||
|
||||
- **BREAKING**: 重命名 4 个 API 端点的请求/响应字段
|
||||
|
||||
- `PATCH /api/admin/iot-cards/series-binding` - 请求参数 `series_allocation_id` → `series_id`
|
||||
- `PATCH /api/admin/devices/series-binding` - 请求参数 `series_allocation_id` → `series_id`
|
||||
- `GET /api/admin/iot-cards/standalone` - 查询参数和响应字段 `series_allocation_id` → `series_id`
|
||||
|
||||
@@ -25,6 +25,7 @@ The system SHALL support filtering devices by package series ID in query paramet
|
||||
The system SHALL include package series ID in device response data.
|
||||
|
||||
**Response Field**: `series_id` (number | null)
|
||||
|
||||
- Value is package series ID if device is bound to a series
|
||||
- Value is null if device has no series binding
|
||||
|
||||
@@ -58,18 +59,21 @@ The system SHALL provide an endpoint to batch set package series binding for dev
|
||||
**Endpoint**: `PATCH /api/admin/devices/series-binding`
|
||||
|
||||
**Request Body**:
|
||||
|
||||
```json
|
||||
{
|
||||
"device_ids": [1, 2, 3],
|
||||
"series_id": 123 // Changed from series_allocation_id
|
||||
"series_id": 123 // Changed from series_allocation_id
|
||||
}
|
||||
```
|
||||
|
||||
**Field Definitions**:
|
||||
|
||||
- `device_ids`: Array of device IDs (max 500 items)
|
||||
- `series_id`: Package series ID (tb_package_series.id), 0 means clear association
|
||||
|
||||
**Response**:
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
|
||||
@@ -25,6 +25,7 @@ The system SHALL support filtering standalone IoT cards by package series ID in
|
||||
The system SHALL include package series ID in standalone IoT card response data.
|
||||
|
||||
**Response Field**: `series_id` (number | null)
|
||||
|
||||
- Value is package series ID if card is bound to a series
|
||||
- Value is null if card has no series binding
|
||||
|
||||
@@ -58,18 +59,21 @@ The system SHALL provide an endpoint to batch set package series binding for IoT
|
||||
**Endpoint**: `PATCH /api/admin/iot-cards/series-binding`
|
||||
|
||||
**Request Body**:
|
||||
|
||||
```json
|
||||
{
|
||||
"iccids": ["898600..."],
|
||||
"series_id": 123 // Changed from series_allocation_id
|
||||
"series_id": 123 // Changed from series_allocation_id
|
||||
}
|
||||
```
|
||||
|
||||
**Field Definitions**:
|
||||
|
||||
- `iccids`: Array of ICCIDs (max 500 items)
|
||||
- `series_id`: Package series ID (tb_package_series.id), 0 means clear association
|
||||
|
||||
**Response**:
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
## 1. 类型定义更新
|
||||
|
||||
### 1.1 批量设置接口参数重命名
|
||||
|
||||
- [x] 1.1.1 更新 `src/types/api/device.ts` 中 BatchSetDeviceSeriesBindingRequest 接口,将 `series_allocation_id` 改为 `series_id`
|
||||
- [x] 1.1.2 更新 `src/types/api/card.ts` 中 BatchSetCardSeriesBindingRequest 接口,将 `series_allocation_id` 改为 `series_id`
|
||||
|
||||
### 1.2 查询参数新增字段
|
||||
|
||||
- [x] 1.2.1 在 `src/types/api/device.ts` 的 DeviceQueryParams 接口中添加 `series_id?: number` 查询参数
|
||||
- [x] 1.2.2 在 `src/types/api/card.ts` 的 StandaloneCardQueryParams 接口中添加 `series_id?: number` 查询参数
|
||||
|
||||
### 1.3 响应类型新增字段
|
||||
|
||||
- [x] 1.3.1 在 `src/types/api/device.ts` 的 Device 接口中添加 `series_id?: number | null` 响应字段(在 updated_at 后面)
|
||||
- [x] 1.3.2 在 `src/types/api/card.ts` 的 StandaloneIotCard 接口中添加 `series_id?: number | null` 响应字段(在 updated_at 后面)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user