|
|
DROP TABLE IF EXISTS `base_screen`;
|
|
|
CREATE TABLE `base_screen` (
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增字段,唯一',
|
|
|
`date` varchar(16) NOT NULL COMMENT '日期 格式 YYYYMMDD',
|
|
|
`type` varchar(64) NOT NULL COMMENT '类型',
|
|
|
`definition` json DEFAULT NULL COMMENT '定义',
|
|
|
`data` json DEFAULT NULL COMMENT '数据',
|
|
|
`open_mock` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启mock模式 0 否 1是',
|
|
|
`mock_data` json DEFAULT NULL COMMENT 'mock 数据',
|
|
|
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
|
|
|
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态,1表示正常,2表示禁用',
|
|
|
`creator` varchar(64) DEFAULT '' COMMENT '创建者',
|
|
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
|
`updater` varchar(64) DEFAULT '' COMMENT '更新者',
|
|
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
|
|
`tenant_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
UNIQUE KEY `uk_date_type` (`date`,`type`,`tenant_id`) USING BTREE
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='大屏数据表';
|