/*
 Navicat Premium Dump SQL

 Source Server         : 1.13.177.47，3306
 Source Server Type    : MySQL
 Source Server Version : 80033 (8.0.33)
 Source Host           : 1.13.177.47:3306
 Source Schema         : tao_iot

 Target Server Type    : MySQL
 Target Server Version : 80033 (8.0.33)
 File Encoding         : 65001

 Date: 25/03/2026 13:24:41
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for base_custom_data
-- ----------------------------
DROP TABLE IF EXISTS `base_custom_data`;
CREATE TABLE `base_custom_data`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `custom_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '自定义数据类型（0OS数据 1EMS数据）',
  `custom_function` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '自定义功能',
  `custom_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '自定义编号',
  `custom_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '自定义数据',
  `custom_sort` int NULL DEFAULT NULL COMMENT '排序',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否标识',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '自定义数据维护' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for base_device_ledger
-- ----------------------------
DROP TABLE IF EXISTS `base_device_ledger`;
CREATE TABLE `base_device_ledger`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `device_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备编号',
  `device_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '设备名称',
  `device_model` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '设备型号',
  `device_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '设备类型（1生产设备 2计量设备）',
  `device_address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'IP地址',
  `device_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '设备状态（0使用 1停用 2报废）',
  `used_department` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '使用部门',
  `cost_center` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '成本中心',
  `manufacturer` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '生产厂商',
  `enable_date` date NULL DEFAULT NULL COMMENT '启用日期',
  `product_line_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '所属工位',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否标识',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `factory_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工厂编号',
  `team_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '班组编号',
  `asset_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '资产编号',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '设备台账' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for base_device_param
-- ----------------------------
DROP TABLE IF EXISTS `base_device_param`;
CREATE TABLE `base_device_param`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `param_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '参数编号',
  `param_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '参数名称',
  `param_network` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '网络地址',
  `param_address` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '参数地址',
  `param_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '参数类型（0int 1float）',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '设备编号',
  `read_frequency` decimal(18, 2) NULL DEFAULT NULL COMMENT '读取频率(毫秒)',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '启用标识',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '设备参数' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for base_factory
-- ----------------------------
DROP TABLE IF EXISTS `base_factory`;
CREATE TABLE `base_factory`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `company_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '公司名称',
  `factory_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工厂编号',
  `factory_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工厂名称',
  `factory_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工厂状态（0启用 1停用）',
  `remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`obj_id`) USING BTREE,
  UNIQUE INDEX `base_factory_obj_id_uindex`(`obj_id` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '工厂管理' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for base_material_info
-- ----------------------------
DROP TABLE IF EXISTS `base_material_info`;
CREATE TABLE `base_material_info`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `material_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '物料编码',
  `material_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '物料名称',
  `material_categories` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '物料大类',
  `material_subclass` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '物料小类（1成品 2BOM）',
  `material_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'SAP物料类型',
  `material_unit` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量单位（1立方米 2吨）',
  `unit_price` decimal(18, 2) NULL DEFAULT NULL COMMENT '单位工资(元)',
  `material_specifications` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '物料型号',
  `factory_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工厂编号',
  `product_line_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '所属工位',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否标识',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `increment_date` datetime NULL DEFAULT NULL COMMENT '增量日期',
  `product_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '商品编码',
  `product_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '商品名称',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '物料信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for base_process_info
-- ----------------------------
DROP TABLE IF EXISTS `base_process_info`;
CREATE TABLE `base_process_info`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `process_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工序编号',
  `process_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工序名称',
  `process_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工序类型（1生产工序）',
  `product_line_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '产线编号',
  `station_codes` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工位编号',
  `capacity_day` decimal(18, 2) NULL DEFAULT NULL COMMENT '日产能',
  `capacity_month` decimal(18, 2) NULL DEFAULT NULL COMMENT '月产能',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '启用标识',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '修改人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '工序信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for base_product_line
-- ----------------------------
DROP TABLE IF EXISTS `base_product_line`;
CREATE TABLE `base_product_line`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `product_line_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '产线/工位编号',
  `product_line_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '产线名称',
  `product_line_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '类别（1产线 2工位）',
  `plant_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '所属工厂',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '启用标识（0启用 1停用）',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `parent_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '父级编号',
  `station_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工位类型（1生产工位 2质检工位）',
  `work_center_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'SAP工作中心编号',
  `work_center_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'SAP工作中心描述',
  `execution_sort` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '执行顺序',
  `capacity_day` decimal(18, 2) NULL DEFAULT NULL COMMENT '日产能(米)',
  `capacity_month` decimal(18, 2) NULL DEFAULT NULL COMMENT '月产能(米)',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '产线/工位信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for base_staff_info
-- ----------------------------
DROP TABLE IF EXISTS `base_staff_info`;
CREATE TABLE `base_staff_info`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `staff_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '员工ID',
  `staff_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '员工名称',
  `staff_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '员工类型（1班长 2组员）',
  `card_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '卡号',
  `team_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '班组编号',
  `phone_number` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '手机号',
  `sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户性别（0男 1女 2未知）',
  `pass_word` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '身份证',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注',
  `wage_coefficient` decimal(18, 2) NULL DEFAULT NULL COMMENT '工资系数',
  `post_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '岗位编码',
  PRIMARY KEY (`obj_id`) USING BTREE,
  UNIQUE INDEX `base_staff_info_staff_id_card_id_uindex`(`staff_id` ASC, `card_id` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '员工信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for base_team_members
-- ----------------------------
DROP TABLE IF EXISTS `base_team_members`;
CREATE TABLE `base_team_members`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `team_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '班组编号',
  `team_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '班组名称',
  `team_head` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '班组负责人',
  `station_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '所属工位',
  `classes` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '班次（1早班 2晚班）',
  `start_time` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '上班时间',
  `end_time` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '下班时间',
  `dine_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '休息时间',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否标识',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `machine_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '机台编号',
  `process_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '工序编号',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '班组信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for daily_fault_record
-- ----------------------------
DROP TABLE IF EXISTS `daily_fault_record`;
CREATE TABLE `daily_fault_record`  (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键，自增ID',
  `date` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '日期',
  `location` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '位置',
  `daily_duty_supervisor` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '科室值班',
  `tenda_daily_duty_supervisor` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '外包值班',
  `fault_situation` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '故障情况',
  `handling_measures` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '处置措施',
  `fault_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '故障类型',
  `fault_occurrence_time` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '故障发生时间',
  `handling_completion_time` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '处置完毕时间',
  `handling_duration` int NULL DEFAULT NULL COMMENT '处置时长',
  `remarks` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '日常故障记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_alarm_action_step
-- ----------------------------
DROP TABLE IF EXISTS `ems_alarm_action_step`;
CREATE TABLE `ems_alarm_action_step`  (
  `obj_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `rule_obj_id` bigint UNSIGNED NOT NULL COMMENT '关联的报警规则ID (逻辑关联 ems_record_alarm_rule.obj_id)',
  `step_sequence` int NOT NULL COMMENT '步骤顺序，从1开始',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '步骤文字描述',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`obj_id`) USING BTREE,
  INDEX `idx_rule_obj_id`(`rule_obj_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 27 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '报警规则具体措施步骤表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_alarm_action_step_image
-- ----------------------------
DROP TABLE IF EXISTS `ems_alarm_action_step_image`;
CREATE TABLE `ems_alarm_action_step_image`  (
  `obj_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `action_step_obj_id` bigint UNSIGNED NOT NULL COMMENT '关联的措施步骤ID (逻辑关联 ems_alarm_action_step.obj_id)',
  `image_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '图片存储URL',
  `image_sequence` int NOT NULL COMMENT '图片在当前步骤内的顺序，从1开始',
  `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '图片描述 (可选)',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`obj_id`) USING BTREE,
  INDEX `idx_action_step_obj_id`(`action_step_obj_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '报警措施步骤图片表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_base_collect_device_info
-- ----------------------------
DROP TABLE IF EXISTS `ems_base_collect_device_info`;
CREATE TABLE `ems_base_collect_device_info`  (
  `obj_id` int NOT NULL AUTO_INCREMENT COMMENT '自增标识',
  `collect_device_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '采集设备编号',
  `collect_device_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '采集设备名称',
  `energy_type_id` int NULL DEFAULT NULL COMMENT '能源类型',
  `model` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '型号',
  `manufacturer` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '生产厂家',
  `ip_address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '通讯地址',
  `produce_date` datetime NULL DEFAULT NULL COMMENT '生产日期',
  `setting_address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '安装地址',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '启用标识（0启用 1停用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 30007 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '采集设备信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_base_energy_price
-- ----------------------------
DROP TABLE IF EXISTS `ems_base_energy_price`;
CREATE TABLE `ems_base_energy_price`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `energy_id` int NOT NULL COMMENT '能源类型',
  `energy_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '能源类型名称',
  `measure_unit` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '单位',
  `month_date` datetime NULL DEFAULT NULL COMMENT '采购月份',
  `price` decimal(18, 6) NULL DEFAULT NULL COMMENT '含税单价',
  `un_tax_price` decimal(18, 6) NULL DEFAULT NULL COMMENT '不含税单价',
  `start_date` datetime NULL DEFAULT NULL COMMENT '开始日期',
  `end_date` datetime NULL DEFAULT NULL COMMENT '结束日期',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人员',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人员',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '能源月份单价' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_base_energy_type
-- ----------------------------
DROP TABLE IF EXISTS `ems_base_energy_type`;
CREATE TABLE `ems_base_energy_type`  (
  `obj_id` int NOT NULL COMMENT '自增标识',
  `energy_type_id` int NULL DEFAULT NULL COMMENT '能源类型编号',
  `energy_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '能源类型名称',
  `measure_unit` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '单位',
  `price` decimal(18, 6) NULL DEFAULT NULL COMMENT '单价',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '能源类型信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_base_monitor_info
-- ----------------------------
DROP TABLE IF EXISTS `ems_base_monitor_info`;
CREATE TABLE `ems_base_monitor_info`  (
  `obj_id` int NOT NULL AUTO_INCREMENT COMMENT '自增标识',
  `parent_id` int NULL DEFAULT NULL COMMENT '父级编号',
  `monitor_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '计量设备编号',
  `monitor_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备名称',
  `monitor_addr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备位置',
  `monitor_type` int NULL DEFAULT NULL COMMENT '计量设备类型',
  `monitor_status` int NULL DEFAULT NULL COMMENT '计量设备状态（0启用 1停用）',
  `collect_device_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '采集设备编号',
  `ancestors` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '祖级列表',
  `grade` int NULL DEFAULT NULL COMMENT '等级',
  `meter_type_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '传感器仪表',
  `correct_value` decimal(18, 2) NULL DEFAULT NULL COMMENT '修正值',
  `pt` decimal(18, 2) NULL DEFAULT NULL COMMENT 'PT值',
  `ct` decimal(18, 2) NULL DEFAULT NULL COMMENT 'CT值',
  `is_ammeter` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否虚拟（0是 1否）',
  `is_key_monitor` int NULL DEFAULT NULL COMMENT '通断复位',
  `is_circuit` int NULL DEFAULT NULL COMMENT '是否断路',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `public_share_type` int NULL DEFAULT NULL COMMENT '公摊表类型',
  `monitor_hierarchy` int NULL DEFAULT NULL COMMENT '表具层级',
  PRIMARY KEY (`obj_id`) USING BTREE,
  UNIQUE INDEX `idx_monitor_id_unique`(`monitor_code` ASC, `monitor_type` ASC) USING BTREE,
  INDEX `idx_parent_id`(`parent_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 90044 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '计量设备信息' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for ems_base_monitor_threshold
-- ----------------------------
DROP TABLE IF EXISTS `ems_base_monitor_threshold`;
CREATE TABLE `ems_base_monitor_threshold`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `monitor_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '计量设备编号',
  `monitor_type` int NULL DEFAULT NULL COMMENT '计量设备类型',
  `i_a_max` decimal(18, 2) NULL DEFAULT NULL COMMENT 'A相电流最大值',
  `i_a_min` decimal(18, 2) NULL DEFAULT NULL COMMENT 'A相电流最小值',
  `i_b_max` decimal(18, 2) NULL DEFAULT NULL COMMENT 'B相电流最大值',
  `i_b_min` decimal(18, 2) NULL DEFAULT NULL COMMENT 'B相电流最小值',
  `i_c_max` decimal(18, 2) NULL DEFAULT NULL COMMENT 'C相电流最大值',
  `i_c_min` decimal(18, 2) NULL DEFAULT NULL COMMENT 'C相电流最小值',
  `v_a_max` decimal(18, 2) NULL DEFAULT NULL COMMENT 'A相电压最大值',
  `v_a_min` decimal(18, 2) NULL DEFAULT NULL COMMENT 'A相电压最小值',
  `v_b_max` decimal(18, 2) NULL DEFAULT NULL COMMENT 'B相电压最大值',
  `v_b_min` decimal(18, 2) NULL DEFAULT NULL COMMENT 'B相电压最小值',
  `v_c_max` decimal(18, 2) NULL DEFAULT NULL COMMENT 'C相电压最大值',
  `v_c_min` decimal(18, 2) NULL DEFAULT NULL COMMENT 'C相电压最小值',
  `hour_consumption` decimal(18, 2) NULL DEFAULT NULL COMMENT '小时耗量',
  `day_consumption` decimal(18, 2) NULL DEFAULT NULL COMMENT '天耗量',
  `line_loss_rate` decimal(18, 2) NULL DEFAULT NULL COMMENT '线损率(%)',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '启用标识（0启用 1停用）',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '修改人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '计量设备阈值维护' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_base_monitor_work_unit
-- ----------------------------
DROP TABLE IF EXISTS `ems_base_monitor_work_unit`;
CREATE TABLE `ems_base_monitor_work_unit`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `monitor_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '计量设备编号',
  `work_unit_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '统计单元编号',
  `monitor_status` int NULL DEFAULT NULL COMMENT '计量设备状态（0启用 1停用）',
  `monitor_type` int NULL DEFAULT NULL COMMENT '计量设备类型',
  `formula_mode` int NULL DEFAULT NULL COMMENT '计算方式（0加 1减）',
  `proportion` decimal(18, 2) NULL DEFAULT NULL COMMENT '比率',
  `remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '启用标识（0启用 1停用）',
  `created_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `created_time` date NULL DEFAULT NULL COMMENT '创建时间',
  `updated_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '修改人',
  `updated_time` date NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '统计计量信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_base_share_price
-- ----------------------------
DROP TABLE IF EXISTS `ems_base_share_price`;
CREATE TABLE `ems_base_share_price`  (
  `obj_id` int NOT NULL COMMENT '自增标识',
  `year_month_date` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '记录月份',
  `price_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '分时电价类型',
  `start_hour` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用电起始小时数',
  `end_hour` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用电结束小时数',
  `dnb_price` decimal(18, 6) NULL DEFAULT NULL COMMENT '电单价',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人员',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人员',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '分时电价维护' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_base_work_unit
-- ----------------------------
DROP TABLE IF EXISTS `ems_base_work_unit`;
CREATE TABLE `ems_base_work_unit`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `work_unit_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '统计单元编号',
  `parent_id` bigint NULL DEFAULT NULL COMMENT '父级编号',
  `work_unit_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '统计单元名称',
  `work_unit_address` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '统计区域',
  `ancestors` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '祖级编号',
  `work_unit_sort` int NULL DEFAULT NULL COMMENT '排序',
  `product_line_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '产线/工位',
  `work_unit_type` int NULL DEFAULT NULL COMMENT '统计单元类型（1建筑）',
  `is_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '启用标识(0启用 1停用)',
  `created_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `created_time` date NULL DEFAULT NULL COMMENT '创建时间',
  `updated_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `updated_time` date NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '统计单元信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_record_alarm_data
-- ----------------------------
DROP TABLE IF EXISTS `ems_record_alarm_data`;
CREATE TABLE `ems_record_alarm_data`  (
  `obj_id` int NOT NULL AUTO_INCREMENT COMMENT '自增标识',
  `monitor_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `collect_device_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '采集设备编号',
  `collect_time` datetime NULL DEFAULT NULL COMMENT '记录时间',
  `alarm_type` int NULL DEFAULT NULL COMMENT '异常类型（0超过阈值 1小于阈值）',
  `alarm_status` int NULL DEFAULT 1 COMMENT '异常状态（0已处理 1未处理）',
  `alarm_data` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '异常数据',
  `operation_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '操作人员',
  `operation_time` datetime NULL DEFAULT NULL COMMENT '操作时间',
  `cause` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `notify_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '通知用户',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 35613 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '异常数据记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_record_alarm_rule
-- ----------------------------
DROP TABLE IF EXISTS `ems_record_alarm_rule`;
CREATE TABLE `ems_record_alarm_rule`  (
  `obj_id` int NOT NULL AUTO_INCREMENT COMMENT '自增标识',
  `rule_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '规则编号',
  `rule_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '规则名称',
  `monitor_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `collect_time` datetime NULL DEFAULT NULL COMMENT '记录时间',
  `energy_type` int NULL DEFAULT NULL COMMENT '能源类型',
  `trigger_rule` int NULL DEFAULT NULL COMMENT '触发规则（0大于 1小于）',
  `monitor_field` int NULL DEFAULT NULL COMMENT '监测字段（0温度，1湿度，2振动-速度(mm/s)，3振动-位移(um)，4振动-加速度(g)，5振动-温度(℃),6-噪音，7-照度，8-气体浓度）',
  `time_range` int NULL DEFAULT NULL COMMENT '时间范围(分)',
  `trigger_value` decimal(16, 2) NULL DEFAULT NULL COMMENT '触发阈值量',
  `notify_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '通知用户',
  `cause` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 30033 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '异常告警规则' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_record_dnb_instant
-- ----------------------------
DROP TABLE IF EXISTS `ems_record_dnb_instant`;
CREATE TABLE `ems_record_dnb_instant`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `monitor_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `collect_time` datetime NULL DEFAULT NULL COMMENT '采集时间',
  `v_a` decimal(18, 2) NULL DEFAULT NULL COMMENT 'A相电压',
  `v_b` decimal(18, 2) NULL DEFAULT NULL COMMENT 'B相电压',
  `v_c` decimal(18, 2) NULL DEFAULT NULL COMMENT 'C相电压',
  `i_a` decimal(18, 2) NULL DEFAULT NULL COMMENT 'A相电流',
  `i_b` decimal(18, 2) NULL DEFAULT NULL COMMENT 'B相电流',
  `i_c` decimal(18, 2) NULL DEFAULT NULL COMMENT 'C相电流',
  `record_time` datetime NULL DEFAULT NULL COMMENT '记录时间',
  `glys` decimal(18, 3) NULL DEFAULT NULL COMMENT '功率因数',
  `zxyg` decimal(18, 2) NULL DEFAULT NULL COMMENT '正向有功',
  `active_power` decimal(18, 2) NULL DEFAULT NULL COMMENT '有功功率',
  `reactive_power` decimal(18, 2) NULL DEFAULT NULL COMMENT '无功功率',
  `collect_type` int NULL DEFAULT NULL COMMENT '采集方式（0自动 1手动）',
  PRIMARY KEY (`obj_id`) USING BTREE,
  INDEX `idx_collect_time`(`collect_time` ASC) USING BTREE,
  INDEX `ems_record_dnb_instant_monitor_id_index`(`monitor_code` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '电实时数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_record_steam_instant
-- ----------------------------
DROP TABLE IF EXISTS `ems_record_steam_instant`;
CREATE TABLE `ems_record_steam_instant`  (
  `obj_id` bigint NOT NULL COMMENT '自增标识',
  `monitor_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `collect_time` datetime NULL DEFAULT NULL COMMENT '采集时间',
  `flux_flow` decimal(18, 2) NULL DEFAULT NULL COMMENT '瞬时流量',
  `steam_flow` decimal(18, 2) NULL DEFAULT NULL COMMENT '累计流量',
  `heat_instant_value` decimal(18, 2) NULL DEFAULT NULL COMMENT '瞬时热量',
  `heat_total_value` decimal(18, 2) NULL DEFAULT NULL COMMENT '累计热量',
  `temperature` decimal(18, 2) NULL DEFAULT NULL COMMENT '温度',
  `press` decimal(18, 2) NULL DEFAULT NULL COMMENT '压力',
  `density` decimal(18, 2) NULL DEFAULT NULL COMMENT '密度',
  `difference_press` decimal(18, 2) NULL DEFAULT NULL COMMENT '压力差值',
  `record_time` datetime NULL DEFAULT NULL COMMENT '记录时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '蒸汽实时数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_record_water_instant
-- ----------------------------
DROP TABLE IF EXISTS `ems_record_water_instant`;
CREATE TABLE `ems_record_water_instant`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `monitor_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `collect_time` datetime NULL DEFAULT NULL COMMENT '采集时间',
  `flux_flow` decimal(18, 2) NULL DEFAULT NULL COMMENT '瞬时流量',
  `water_flow` decimal(18, 2) NULL DEFAULT NULL COMMENT '累计流量',
  `record_time` datetime NULL DEFAULT NULL COMMENT '记录时间',
  `collect_type` int NULL DEFAULT NULL COMMENT '采集方式（0自动 1手动）',
  PRIMARY KEY (`obj_id`) USING BTREE,
  INDEX `idx_collect_time`(`collect_time` ASC) USING BTREE,
  INDEX `ems_record_water_instant_monitor_id_index`(`monitor_code` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '水实时数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_report_point_dnb
-- ----------------------------
DROP TABLE IF EXISTS `ems_report_point_dnb`;
CREATE TABLE `ems_report_point_dnb`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `monitor_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `instrument_value` decimal(18, 2) NULL DEFAULT NULL COMMENT '仪表值',
  `expend` decimal(18, 2) NULL DEFAULT NULL COMMENT '耗量',
  `record_time` datetime NULL DEFAULT NULL COMMENT '记录时间',
  `begin_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
  `update_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '修改标识（0是 1否）',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` date NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` date NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '电整点数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_report_point_steam
-- ----------------------------
DROP TABLE IF EXISTS `ems_report_point_steam`;
CREATE TABLE `ems_report_point_steam`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `monitor_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `instrument_value` decimal(18, 2) NULL DEFAULT NULL COMMENT '仪表值',
  `expend` decimal(18, 2) NULL DEFAULT NULL COMMENT '耗量',
  `record_time` datetime NULL DEFAULT NULL COMMENT '记录时间',
  `begin_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
  `update_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '修改标识（0是 1否）',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` date NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` date NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '蒸汽整点数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ems_report_point_water
-- ----------------------------
DROP TABLE IF EXISTS `ems_report_point_water`;
CREATE TABLE `ems_report_point_water`  (
  `obj_id` bigint NOT NULL COMMENT '主键标识',
  `monitor_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `instrument_value` decimal(18, 2) NULL DEFAULT NULL COMMENT '仪表值',
  `expend` decimal(18, 2) NULL DEFAULT NULL COMMENT '耗量',
  `record_time` datetime NULL DEFAULT NULL COMMENT '记录时间',
  `begin_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
  `update_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '修改标识（0是 1否）',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人',
  `create_time` date NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新人',
  `update_time` date NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`obj_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '水整点数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for fault_handling_record
-- ----------------------------
DROP TABLE IF EXISTS `fault_handling_record`;
CREATE TABLE `fault_handling_record`  (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键，自增ID',
  `fault_date` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '故障日期',
  `fault_location` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '故障位置',
  `handling_personnel` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '处理人员',
  `fault_phenomenon_and_cause` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '故障现象及原因',
  `fault_situation_handling` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '故障情况处置',
  `impact` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '影响',
  `fault_occurrence_time` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '故障发生时间',
  `handling_duration` int NULL DEFAULT NULL COMMENT '处置时长',
  `main_components_repaired` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '维修更换的主要元器件',
  `remarks` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '故障处置记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gen_table
-- ----------------------------
DROP TABLE IF EXISTS `gen_table`;
CREATE TABLE `gen_table`  (
  `table_id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
  `table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '表名称',
  `table_comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '表描述',
  `sub_table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '关联子表的表名',
  `sub_table_fk_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '子表关联的外键名',
  `class_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '实体类名称',
  `tpl_category` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '使用的模板（crud单表操作 tree树表操作）',
  `tpl_web_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '前端模板类型（element-ui模版 element-plus模版）',
  `package_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '生成包路径',
  `module_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '生成模块名',
  `business_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '生成业务名',
  `function_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '生成功能名',
  `function_author` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '生成功能作者',
  `gen_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '生成代码方式（0zip压缩包 1自定义路径）',
  `gen_path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '生成路径（不填默认项目路径）',
  `options` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '其它生成选项',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注',
  PRIMARY KEY (`table_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 101 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '代码生成业务表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gen_table_column
-- ----------------------------
DROP TABLE IF EXISTS `gen_table_column`;
CREATE TABLE `gen_table_column`  (
  `column_id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
  `table_id` bigint NULL DEFAULT NULL COMMENT '归属表编号',
  `column_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '列名称',
  `column_comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '列描述',
  `column_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '列类型',
  `java_type` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT 'JAVA类型',
  `java_field` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'JAVA字段名',
  `is_pk` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否主键（1是）',
  `is_increment` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否自增（1是）',
  `is_required` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否必填（1是）',
  `is_insert` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否为插入字段（1是）',
  `is_edit` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否编辑字段（1是）',
  `is_list` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否列表字段（1是）',
  `is_query` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否查询字段（1是）',
  `query_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '查询方式（等于、不等于、大于、小于、范围）',
  `html_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '显示类型（文本框、文本域、下拉框、复选框、单选框、日期控件）',
  `dict_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '字典类型',
  `sort` int NULL DEFAULT NULL COMMENT '排序',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`column_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1494 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '代码生成业务表字段' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for luggage_system_plc_buffer_battery_lifecycle
-- ----------------------------
DROP TABLE IF EXISTS `luggage_system_plc_buffer_battery_lifecycle`;
CREATE TABLE `luggage_system_plc_buffer_battery_lifecycle`  (
  `objid` bigint NOT NULL AUTO_INCREMENT COMMENT '主键，自增ID',
  `type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '类型',
  `installation_cabinet_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '安装柜体名称',
  `location_description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '位置描述',
  `source` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '来源',
  `power_source` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '取电',
  `image_address` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '图片地址',
  `remarks` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '备注',
  `first_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第1次',
  `second_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第2次',
  `third_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第3次',
  `fourth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第4次',
  `fifth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第5次',
  `sixth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第6次',
  `seventh_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第7次',
  `eighth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第8次',
  `ninth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第9次',
  `tenth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第10次',
  `eleventh_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第11次',
  `twelfth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第12次',
  PRIMARY KEY (`objid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '行李系统PLC缓冲电池生命周期表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for luggage_system_security_door_battery_lifecycle
-- ----------------------------
DROP TABLE IF EXISTS `luggage_system_security_door_battery_lifecycle`;
CREATE TABLE `luggage_system_security_door_battery_lifecycle`  (
  `objid` bigint NOT NULL AUTO_INCREMENT COMMENT '主键，自增ID',
  `type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '类型',
  `reference_location` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '参照位置',
  `location_description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '位置描述',
  `power_source` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '取电',
  `battery_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '电池类型',
  `image_address` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '图片地址',
  `remarks` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '备注',
  `first_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第1次',
  `second_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第2次',
  `third_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第3次',
  `fourth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第4次',
  `fifth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第5次',
  `sixth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第6次',
  `seventh_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第7次',
  `eighth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第8次',
  `ninth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第9次',
  `tenth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第10次',
  `eleventh_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第11次',
  `twelfth_instance` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '第12次',
  PRIMARY KEY (`objid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '行李系统安全门铅酸电池生命周期表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for power_energy_spare_parts_registration
-- ----------------------------
DROP TABLE IF EXISTS `power_energy_spare_parts_registration`;
CREATE TABLE `power_energy_spare_parts_registration`  (
  `objid` bigint NOT NULL AUTO_INCREMENT COMMENT '主键，自增ID',
  `date` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '日期',
  `spare_parts_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备件名称',
  `spare_part_model` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备件型号',
  `waste_quantity` int NULL DEFAULT NULL COMMENT '废存数量',
  `storage_location` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '存放位置',
  `registrar` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '登记人',
  `warehouse_confirmation` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '库管确认',
  `remarks` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '备注',
  PRIMARY KEY (`objid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 154 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '动力能源部行输科废旧备件登记表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for power_energy_supervision_checklist
-- ----------------------------
DROP TABLE IF EXISTS `power_energy_supervision_checklist`;
CREATE TABLE `power_energy_supervision_checklist`  (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键，自增ID',
  `date` varchar(19) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '日期',
  `job_category` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '作业类别',
  `job_unit` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '作业单位',
  `job_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '作业名称',
  `job_risk` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '作业风险',
  `risk_control_measures` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '风险管控措施',
  `supervision_level` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '监督检查层级',
  `supervision_implementation` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '监督检查落实情况',
  `job_department` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '作业科室',
  `regulatory_personnel` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '监管人员',
  `inspection_personnel` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '检查人员',
  `problems_found` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '检查出的问题',
  `outsourcing_unit_responsible_person` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '外包单位责任人',
  `work_order_change_content` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '工单变更内容',
  `is_work_order_closed_loop` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '本工单是否闭环',
  `remarks` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1004 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '动力能源部监督检查清单表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for record_dnb_instant
-- ----------------------------
DROP TABLE IF EXISTS `record_dnb_instant`;
CREATE TABLE `record_dnb_instant`  (
  `objid` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
  `monitor_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `va` decimal(18, 2) NULL DEFAULT NULL COMMENT 'A项电压',
  `vb` decimal(18, 2) NULL DEFAULT NULL COMMENT 'B项电压',
  `vc` decimal(18, 2) NULL DEFAULT NULL COMMENT 'C项电压',
  `ia` decimal(18, 2) NULL DEFAULT NULL COMMENT 'A项电流',
  `ib` decimal(18, 2) NULL DEFAULT NULL COMMENT 'B项电流',
  `ic` decimal(18, 2) NULL DEFAULT NULL COMMENT 'C项电流',
  `glys` decimal(18, 2) NULL DEFAULT NULL COMMENT '功率因数',
  `zxyg` decimal(18, 2) NULL DEFAULT NULL COMMENT '正向有功',
  `active_power` decimal(18, 2) NULL DEFAULT NULL COMMENT '有功功率',
  `reactive_power` decimal(18, 2) NULL DEFAULT NULL COMMENT '无功功率',
  `collect_type` int NULL DEFAULT 0 COMMENT '采集方式',
  `collect_time` datetime NULL DEFAULT NULL COMMENT '采集时间',
  `record_time` datetime NULL DEFAULT NULL COMMENT '记录时间',
  PRIMARY KEY (`objid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 43 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '电实时数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for record_dnb_instant_20250521
-- ----------------------------
DROP TABLE IF EXISTS `record_dnb_instant_20250521`;
CREATE TABLE `record_dnb_instant_20250521`  (
  `objid` bigint NOT NULL,
  `monitor_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `va` decimal(18, 4) NOT NULL,
  `vb` decimal(18, 4) NOT NULL,
  `vc` decimal(18, 4) NOT NULL,
  `ia` decimal(18, 4) NOT NULL,
  `ib` decimal(18, 4) NOT NULL,
  `ic` decimal(18, 4) NOT NULL,
  `glys` decimal(18, 4) NOT NULL,
  `zxyg` decimal(18, 4) NOT NULL,
  `active_power` decimal(18, 4) NOT NULL,
  `reactive_power` decimal(18, 4) NOT NULL,
  `collect_type` int NOT NULL,
  `collect_time` datetime NOT NULL,
  `record_time` datetime NOT NULL,
  PRIMARY KEY (`objid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for record_fluid_instant
-- ----------------------------
DROP TABLE IF EXISTS `record_fluid_instant`;
CREATE TABLE `record_fluid_instant`  (
  `objid` bigint NOT NULL AUTO_INCREMENT COMMENT '自增标识',
  `monitor_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `temperature` decimal(18, 2) NULL DEFAULT NULL COMMENT '温度值',
  `press` decimal(18, 2) NULL DEFAULT NULL COMMENT '压力值',
  `frequency` decimal(18, 2) NULL DEFAULT NULL COMMENT '频率值',
  `density` decimal(18, 2) NULL DEFAULT NULL COMMENT '密度值',
  `instant_heat` decimal(18, 2) NULL DEFAULT NULL COMMENT '瞬时热量',
  `total_heat` decimal(18, 2) NULL DEFAULT NULL COMMENT '累计热量值',
  `instant_flow` decimal(18, 2) NULL DEFAULT NULL COMMENT '瞬时流量',
  `total_flow` decimal(18, 2) NULL DEFAULT NULL COMMENT '累计流量',
  `collect_type` int NULL DEFAULT 0 COMMENT '采集方式',
  `collect_time` datetime NULL DEFAULT NULL COMMENT '采集时间',
  `record_time` datetime NULL DEFAULT NULL COMMENT '记录时间',
  PRIMARY KEY (`objid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '流体实时数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for record_iotenv_instant
-- ----------------------------
DROP TABLE IF EXISTS `record_iotenv_instant`;
CREATE TABLE `record_iotenv_instant`  (
  `objid` bigint NOT NULL AUTO_INCREMENT COMMENT '主键标识',
  `monitorId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `temperature` decimal(18, 2) NULL DEFAULT NULL COMMENT '温度',
  `humidity` decimal(18, 2) NULL DEFAULT NULL COMMENT '湿度',
  `illuminance` decimal(18, 2) NULL DEFAULT NULL COMMENT '照度',
  `noise` decimal(18, 2) NULL DEFAULT NULL COMMENT '噪声',
  `concentration` decimal(18, 2) NULL DEFAULT NULL COMMENT '硫化氢浓度',
  `vibration_speed` decimal(18, 2) NULL DEFAULT NULL COMMENT '振动-速度(mm/s)',
  `vibration_displacement` decimal(18, 2) NULL DEFAULT NULL COMMENT '振动-位移(um)',
  `vibration_acceleration` decimal(18, 2) NULL DEFAULT NULL COMMENT '振动-加速度(g)',
  `vibration_temp` decimal(18, 2) NULL DEFAULT NULL COMMENT '振动-温度(℃)',
  `collectTime` datetime NULL DEFAULT NULL COMMENT '采集时间',
  `recodeTime` datetime NULL DEFAULT NULL COMMENT '记录时间',
  PRIMARY KEY (`objid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 30001 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '物联网数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for record_iotenv_instant_20250523
-- ----------------------------
DROP TABLE IF EXISTS `record_iotenv_instant_20250523`;
CREATE TABLE `record_iotenv_instant_20250523`  (
  `objid` bigint NOT NULL,
  `monitorId` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `temperature` decimal(18, 4) NOT NULL,
  `humidity` decimal(18, 4) NOT NULL,
  `illuminance` decimal(18, 4) NOT NULL,
  `noise` decimal(18, 4) NOT NULL,
  `concentration` decimal(18, 4) NOT NULL,
  `vibration_speed` decimal(18, 4) NOT NULL,
  `vibration_displacement` decimal(18, 4) NOT NULL,
  `vibration_acceleration` decimal(18, 4) NOT NULL,
  `vibration_temp` decimal(18, 4) NOT NULL,
  `collectTime` datetime NOT NULL,
  `recodeTime` datetime NOT NULL,
  PRIMARY KEY (`objid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for record_iotenv_instant_20260325
-- ----------------------------
DROP TABLE IF EXISTS `record_iotenv_instant_20260325`;
CREATE TABLE `record_iotenv_instant_20260325`  (
  `objid` bigint NOT NULL,
  `monitorId` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `temperature` decimal(18, 4) NOT NULL,
  `humidity` decimal(18, 4) NOT NULL,
  `illuminance` decimal(18, 4) NOT NULL,
  `noise` decimal(18, 4) NOT NULL,
  `concentration` decimal(18, 4) NOT NULL,
  `vibration_speed` decimal(18, 4) NOT NULL,
  `vibration_displacement` decimal(18, 4) NOT NULL,
  `vibration_acceleration` decimal(18, 4) NOT NULL,
  `vibration_temp` decimal(18, 4) NOT NULL,
  `collectTime` datetime NOT NULL,
  `recodeTime` datetime NOT NULL,
  PRIMARY KEY (`objid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config`  (
  `config_id` int NOT NULL COMMENT '参数主键',
  `config_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '参数名称',
  `config_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '参数键名',
  `config_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '参数键值',
  `config_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '系统内置（Y是 N否）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注',
  PRIMARY KEY (`config_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '参数配置表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept`  (
  `dept_id` bigint NOT NULL AUTO_INCREMENT COMMENT '部门id',
  `parent_id` bigint NULL DEFAULT NULL COMMENT '父部门id',
  `ancestors` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '祖级列表',
  `dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部门名称',
  `order_num` int NULL DEFAULT NULL COMMENT '显示顺序',
  `leader` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '负责人',
  `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '联系电话',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '邮箱',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部门状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`dept_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 112 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '部门表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_dict_data
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_data`;
CREATE TABLE `sys_dict_data`  (
  `dict_code` bigint NOT NULL AUTO_INCREMENT COMMENT '字典编码',
  `dict_sort` int NULL DEFAULT NULL COMMENT '字典排序',
  `dict_label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '字典标签',
  `dict_value` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '字典键值',
  `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '字典类型',
  `css_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '样式属性（其他样式扩展）',
  `list_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '表格回显样式',
  `is_default` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否默认（Y是 N否）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '状态（0正常 1停用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注',
  PRIMARY KEY (`dict_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 30108 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '字典数据表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_dict_type
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_type`;
CREATE TABLE `sys_dict_type`  (
  `dict_id` bigint NOT NULL AUTO_INCREMENT COMMENT '字典主键',
  `dict_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '字典名称',
  `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '字典类型',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '状态（0正常 1停用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注',
  PRIMARY KEY (`dict_id`) USING BTREE,
  UNIQUE INDEX `dict_type`(`dict_type` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 30038 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '字典类型表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_job
-- ----------------------------
DROP TABLE IF EXISTS `sys_job`;
CREATE TABLE `sys_job`  (
  `job_id` bigint NOT NULL COMMENT '任务ID',
  `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务名称',
  `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务组名',
  `invoke_target` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '调用目标字符串',
  `cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'cron执行表达式',
  `misfire_policy` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计划执行错误策略（1立即执行 2执行一次 3放弃执行）',
  `concurrent` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否并发执行（0允许 1禁止）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '状态（0正常 1暂停）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注信息',
  PRIMARY KEY (`job_id`, `job_name`, `job_group`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '定时任务调度表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_job_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_job_log`;
CREATE TABLE `sys_job_log`  (
  `job_log_id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务日志ID',
  `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务名称',
  `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务组名',
  `invoke_target` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '调用目标字符串',
  `job_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '日志信息',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '执行状态（0正常 1失败）',
  `exception_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '异常信息',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`job_log_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11102 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '定时任务调度日志表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_logininfor
-- ----------------------------
DROP TABLE IF EXISTS `sys_logininfor`;
CREATE TABLE `sys_logininfor`  (
  `info_id` bigint NOT NULL AUTO_INCREMENT COMMENT '访问ID',
  `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户账号',
  `ipaddr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '登录IP地址',
  `login_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '登录地点',
  `browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '浏览器类型',
  `os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '操作系统',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '登录状态（0成功 1失败）',
  `msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '提示消息',
  `login_time` datetime NULL DEFAULT NULL COMMENT '访问时间',
  PRIMARY KEY (`info_id`) USING BTREE,
  INDEX `idx_sys_logininfor_s`(`status` ASC) USING BTREE COMMENT '系统访问记录表登录状态索引',
  INDEX `idx_sys_logininfor_lt`(`login_time` ASC) USING BTREE COMMENT '系统访问记录表登录时间索引'
) ENGINE = InnoDB AUTO_INCREMENT = 20625 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '系统访问记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu`  (
  `menu_id` bigint NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
  `menu_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '菜单名称',
  `parent_id` bigint NULL DEFAULT NULL COMMENT '父菜单ID',
  `order_num` int NULL DEFAULT NULL COMMENT '显示顺序',
  `path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '路由地址',
  `component` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '组件路径',
  `query` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '路由参数',
  `is_frame` int NULL DEFAULT NULL COMMENT '是否为外链（0是 1否）',
  `is_cache` int NULL DEFAULT NULL COMMENT '是否缓存（0缓存 1不缓存）',
  `menu_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '菜单类型（M目录 C菜单 F按钮）',
  `visible` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '菜单状态（0显示 1隐藏）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '菜单状态（0正常 1停用）',
  `perms` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '权限标识',
  `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '菜单图标',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注',
  PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11474 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '菜单权限表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_notice
-- ----------------------------
DROP TABLE IF EXISTS `sys_notice`;
CREATE TABLE `sys_notice`  (
  `notice_id` int NOT NULL COMMENT '公告ID',
  `notice_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '公告标题',
  `notice_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '公告类型（1通知 2公告）',
  `notice_content` longblob NULL COMMENT '公告内容',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '公告状态（0正常 1关闭）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`notice_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '通知公告表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_oper_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_oper_log`;
CREATE TABLE `sys_oper_log`  (
  `oper_id` bigint NOT NULL AUTO_INCREMENT COMMENT '日志主键',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '模块标题',
  `business_type` int NULL DEFAULT NULL COMMENT '业务类型（0其它 1新增 2修改 3删除）',
  `method` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '方法名称',
  `request_method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '请求方式',
  `operator_type` int NULL DEFAULT NULL COMMENT '操作类别（0其它 1后台用户 2手机端用户）',
  `oper_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '操作人员',
  `dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部门名称',
  `oper_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '请求URL',
  `oper_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '主机地址',
  `oper_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '操作地点',
  `oper_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '请求参数',
  `json_result` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '返回参数',
  `status` int NULL DEFAULT NULL COMMENT '操作状态（0正常 1异常）',
  `error_msg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '错误消息',
  `oper_time` datetime NULL DEFAULT NULL COMMENT '操作时间',
  `cost_time` bigint NULL DEFAULT NULL COMMENT '消耗时间',
  PRIMARY KEY (`oper_id`) USING BTREE,
  INDEX `idx_sys_oper_log_bt`(`business_type` ASC) USING BTREE COMMENT '业务类型索引',
  INDEX `idx_sys_oper_log_s`(`status` ASC) USING BTREE COMMENT '操作状态索引',
  INDEX `idx_sys_oper_log_ot`(`oper_time` ASC) USING BTREE COMMENT '操作时间索引'
) ENGINE = InnoDB AUTO_INCREMENT = 10790 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '操作日志记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_post`;
CREATE TABLE `sys_post`  (
  `post_id` bigint NOT NULL AUTO_INCREMENT COMMENT '岗位ID',
  `post_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '岗位编码',
  `post_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '岗位名称',
  `post_sort` int NOT NULL COMMENT '显示顺序',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '状态（0正常 1停用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注',
  PRIMARY KEY (`post_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '岗位信息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role`  (
  `role_id` bigint NOT NULL AUTO_INCREMENT COMMENT '角色ID',
  `role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '角色名称',
  `role_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '角色权限字符串',
  `role_sort` int NOT NULL COMMENT '显示顺序',
  `data_scope` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）',
  `menu_check_strictly` tinyint NULL DEFAULT NULL COMMENT '菜单树选择项是否关联显示',
  `dept_check_strictly` tinyint NULL DEFAULT NULL COMMENT '部门树选择项是否关联显示',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '角色状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注',
  PRIMARY KEY (`role_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '角色信息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_role_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_dept`;
CREATE TABLE `sys_role_dept`  (
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `dept_id` bigint NOT NULL COMMENT '部门ID',
  PRIMARY KEY (`role_id`, `dept_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '角色和部门关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu`  (
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `menu_id` bigint NOT NULL COMMENT '菜单ID',
  PRIMARY KEY (`role_id`, `menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '角色和菜单关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user`  (
  `user_id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `dept_id` bigint NULL DEFAULT NULL COMMENT '部门ID',
  `user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户账号',
  `nick_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户昵称',
  `user_type` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户类型（00系统用户）',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户邮箱',
  `phonenumber` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '手机号码',
  `sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户性别（0男 1女 2未知）',
  `avatar` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '头像地址',
  `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '密码',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '帐号状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '删除标志（0代表存在 2代表删除）',
  `login_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '最后登录IP',
  `login_date` datetime NULL DEFAULT NULL COMMENT '最后登录时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户信息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_user_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_post`;
CREATE TABLE `sys_user_post`  (
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `post_id` bigint NOT NULL COMMENT '岗位ID',
  PRIMARY KEY (`user_id`, `post_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户与岗位关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role`  (
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `role_id` bigint NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`user_id`, `role_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户和角色关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_sys_collectdevice_log
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_collectdevice_log`;
CREATE TABLE `t_sys_collectdevice_log`  (
  `CollectDeviceID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `Online` datetime NULL DEFAULT NULL,
  `Offline` datetime NULL DEFAULT NULL,
  `State` int NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_vibrationsensor_data
-- ----------------------------
DROP TABLE IF EXISTS `t_vibrationsensor_data`;
CREATE TABLE `t_vibrationsensor_data`  (
  `objId` bigint NOT NULL COMMENT '主键标识',
  `collectTime` datetime NULL DEFAULT NULL COMMENT '采集时间',
  `sensor_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '振动传感器编号',
  `speed` decimal(18, 2) NULL DEFAULT NULL COMMENT '速度(mm/s)',
  `displacement` decimal(18, 2) NULL DEFAULT NULL COMMENT '位移(um)',
  `acceleration` decimal(18, 2) NULL DEFAULT NULL COMMENT '加速度(g)',
  `temperature` decimal(18, 2) NULL DEFAULT NULL COMMENT '温度(℃)',
  `recodeTime` datetime NULL DEFAULT NULL COMMENT '记录时间',
  `remark` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`objId`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '振动传感器数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_w_temperturedata
-- ----------------------------
DROP TABLE IF EXISTS `t_w_temperturedata`;
CREATE TABLE `t_w_temperturedata`  (
  `objid` bigint NOT NULL COMMENT '主键标识',
  `monitorId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '计量设备编号',
  `collectTime` datetime NULL DEFAULT NULL COMMENT '采集时间',
  `tempreture` decimal(18, 2) NULL DEFAULT NULL COMMENT '温度',
  `humidity` decimal(18, 2) NULL DEFAULT NULL COMMENT '湿度',
  `illuminance` decimal(18, 2) NULL DEFAULT NULL COMMENT '照度',
  `noise` decimal(18, 2) NULL DEFAULT NULL COMMENT '噪声',
  `concentration` decimal(18, 2) NULL DEFAULT NULL COMMENT '硫化氢浓度',
  `recodeTime` datetime NULL DEFAULT NULL COMMENT '记录时间',
  `alarmType` int NULL DEFAULT NULL COMMENT '报警类型',
  `confirmPersonID` int NULL DEFAULT NULL,
  `confirmTime` datetime NULL DEFAULT NULL,
  `confirmFlag` int NULL DEFAULT NULL,
  PRIMARY KEY (`objid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '动力环境数据' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
