智电改造网关表:electric\_gatway(ICC同步)
| 字段 | 类型 | 键 | 说明 |
| :--------- | :---------- | :----- | :--------------- |
| id | BIGSERIAL | PK | 自增主键 |
| iccImei | VARCHAR(64) | UNIQUE | 设备唯一标识码,设备的imei号 |
| deviceCode | VARCHAR(64) | UNIQUE | 设备编码 |
| deviceName | VARCHAR(64) |
| 设备名称 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
智电改造线路表:electric_line(ICC探测器同步)
| 字段 | 类型 | 键 | 说明 |
| :------------------ | :----------- | :----- | :------------------------------------------------------- |
| id | BIGSERIAL | PK | 自增主键 |
| line_code | VARCHAR(64) | UNIQUE | 探测器编码(ICC detectorCode,唯一幂等键) |
| equip_id | BIGINT | FK | 客户设备 ID(→ customer_equipment,可空,同步不填充) |
| gateway_id | BIGINT | FK | 网关设备 ID(→ electric_gateway,由 parentCode↔device_code 匹配) |
| customer_id | BIGINT | FK | 客户 ID(orgCode→customer.icc_code 解析,逻辑隔离键) |
| line_name | VARCHAR(128) | | 探测器名称(ICC detectorName) |
| imei | VARCHAR(64) | | 设备唯一标识码(ICC imei) |
| type_code | VARCHAR(32) | | 探测器类型编码 |
| type_name | VARCHAR(64) | | 探测器类型名称 |
| fire_system_code | VARCHAR(64) | | 消防系统编码 |
| fire_system_name | VARCHAR(128) | | 消防系统名称 |
| part_unit_loop_code | VARCHAR(64) | | 探测器回路号 |
| channel_no | VARCHAR(64) | | 探测器通道号 |
| channel_sn | VARCHAR(64) | | 通道唯一标识码 |
| produce_date | VARCHAR(16) | | 生产日期(yyyy-MM-dd) |
| status | SMALLINT | | 探测器状态:1在线 0离线(detectorStatus 01→1 / 02→0) |
| synced_at | TIMESTAMPTZ | | ICC 同步时间 |
| created_at | TIMESTAMPTZ | | 创建时间 |