| | |
| | | `field_name` VARCHAR(30) COMMENT '中文名' , |
| | | `field_type` VARCHAR(30) COMMENT '数据类型' , |
| | | `sort` int COMMENT '排序', |
| | | PRIMARY KEY (id) USING BTREE |
| | | PRIMARY KEY (id) USING BTREE, |
| | | INDEX `idx_data_set_id` (`data_set_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '指标数据集字段'; |
| | | |
| | | CREATE TABLE t_ind_item_category( |
| | |
| | | `item_name` VARCHAR(36) COMMENT '指标名称' , |
| | | `item_type` VARCHAR(20) COMMENT '指标类型' , |
| | | `item_category` VARCHAR(20) COMMENT '指标分类' , |
| | | `coefficient` decimal(10, 4) COMMENT '系数', |
| | | `coefficient` decimal(10, 4) COMMENT '转换系数', |
| | | `precision` int COMMENT '指标精度', |
| | | `time_granularity` VARCHAR(10) COMMENT '时间粒度' , |
| | | `unit` VARCHAR(10) COMMENT '数量单位' , |
| | | `remark` VARCHAR(255) COMMENT '备注' , |
| | | `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0正常 1停用)', |
| | | `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', |
| | |
| | | `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', |
| | | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_item_no` (`item_no`) USING BTREE |
| | | UNIQUE INDEX `uk_item_no` (`item_no`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '指标项表'; |
| | | |
| | | CREATE TABLE t_ind_item_atom( |
| | |
| | | `expression` varchar(100) DEFAULT NULL COMMENT '计算表达式', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_item_id` (`item_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '计算指标'; |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '复合指标'; |
| | | |
| | | |
| | | CREATE TABLE `t_ind_item_value` ( |
| | | `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'id', |
| | | `item_no` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '指标编码', |
| | | `data_time` varchar(36) DEFAULT NULL COMMENT '数据时间', |
| | | `data_time` varchar(20) DEFAULT NULL COMMENT '数据时间', |
| | | `data_value` decimal(24,6) DEFAULT NULL COMMENT '数据值', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | KEY `idx_item_no` (`item_no`) USING BTREE, |