M5-T02: add modbus_device and modbus_reading tables and models
This commit is contained in:
@@ -290,7 +290,7 @@ Phase C(MQTT / Discovery,依赖 B 的设备数据与 provider 接口)
|
||||
- **Reviewer checklist**: 仅改 ConfigPage(+其测试),未碰 config 后端或主 layout;保存逻辑无回归;页面内**无第二个 app 级 sidebar**(accordion 是内容、非 chrome)。
|
||||
|
||||
### M5-T02 — `modbus_device` + `modbus_reading` 表与模型 `[schema]`
|
||||
- **Status**: `todo` · **Depends**: none
|
||||
- **Status**: `done` · **Depends**: none
|
||||
- **Context**: 单库 app 链新增两张**通用**表,建出 §3.2 结构(设备 = 部署层,读数 = JSON payload 通用遥测层)。本任务只建 schema + 模型,不写采集/接口。
|
||||
- **Files**: `create app/models/modbus.py`(`ModbusDevice`、`ModbusReading`,继承 `app.db.Base`);`create alembic_app/versions/<date>_07_modbus_tables.py`;`modify alembic_app/env.py`(import 新模型);`modify scripts/app_db_adopt.py`(`APP_BASELINE_REVISION` → 新 head);`create tests/test_modbus_models.py`
|
||||
- **Steps**:
|
||||
|
||||
Reference in New Issue
Block a user