CREATE TABLE IF NOT EXISTS `t_emind_energy_block` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', `station_local_id` bigint NOT NULL COMMENT '本地储能站主键', `station_id` bigint NOT NULL COMMENT 'eMind电站ID', `station_name` varchar(255) NOT NULL COMMENT '电站名称', `eblock_id` bigint DEFAULT NULL COMMENT 'eMind能量块ID', `elink_uuid` varchar(128) DEFAULT NULL COMMENT '所属能量链UUID', `uuid` varchar(128) NOT NULL COMMENT '能量块设备UUID', `eblock_name` varchar(255) DEFAULT NULL COMMENT '能量块名称', `run_status` tinyint DEFAULT NULL COMMENT '工作状态(1停机,2待机,3充电,4放电)', `dischargeable_energy` decimal(18,4) DEFAULT NULL COMMENT '剩余可放电量(kWh)', `soc` decimal(8,4) DEFAULT NULL COMMENT 'SOC(%)', `max_charge_power` decimal(18,4) DEFAULT NULL COMMENT '最大充电功率(kW)', `max_discharge_power` decimal(18,4) DEFAULT NULL COMMENT '最大放电功率(kW)', `dc_voltage` decimal(18,4) DEFAULT NULL COMMENT 'PCS直流侧电压(V)', `dc_current` decimal(18,4) DEFAULT NULL COMMENT 'PCS直流侧电流(A)', `dc_power` decimal(18,4) DEFAULT NULL COMMENT 'PCS直流侧功率(kW)', `soh` decimal(8,4) DEFAULT NULL COMMENT '电池健康状态(%)', `cabinet_temperature` decimal(10,4) DEFAULT NULL COMMENT '柜体温度(摄氏度)', `min_cell_voltage` decimal(18,4) DEFAULT NULL COMMENT '最低电芯电压(mV)', `max_cell_voltage` decimal(18,4) DEFAULT NULL COMMENT '最高电芯电压(mV)', `min_cell_temperature` decimal(10,4) DEFAULT NULL COMMENT '最低电芯温度(摄氏度)', `max_cell_temperature` decimal(10,4) DEFAULT NULL COMMENT '最高电芯温度(摄氏度)', `pcs_state` tinyint DEFAULT NULL COMMENT 'PCS状态', `pcs_active_power` decimal(18,4) DEFAULT NULL COMMENT 'PCS有功功率(kW)', `pcs_reactive_power` decimal(18,4) DEFAULT NULL COMMENT 'PCS无功功率(kvar)', `record_time` varchar(64) DEFAULT NULL COMMENT '厂商数据时间', `del_flag` tinyint NOT NULL DEFAULT 0 COMMENT '删除标记(0正常,1远端已删除)', `synced_at` datetime NOT NULL COMMENT '最近同步时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `uk_emind_energy_block_station_uuid` (`station_id`, `uuid`), KEY `idx_emind_energy_block_station_local` (`station_local_id`), KEY `idx_emind_energy_block_status` (`del_flag`, `run_status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='eMind储能能量块本地冗余';