-- ----------------------------
-- Table structure for banner
-- ----------------------------
DROP TABLE IF EXISTS `banner`;
CREATE TABLE `banner`
(
    `id`                bigint                                                         NOT NULL AUTO_INCREMENT COMMENT 'id',
    `type`              tinyint                                                        NOT NULL DEFAULT 1 COMMENT '类型 1欢迎页 2主题活动 3生日祝福 4数据展示',
    `category`          tinyint(4) DEFAULT NULL COMMENT '类别 1、海报 2、模版',
    `name`              varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci           DEFAULT NULL COMMENT '名称',
    `title`             varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci           DEFAULT NULL COMMENT '标题',
    `content`           TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci default NULL COMMENT '内容',
    `url`               varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '链接',
    `images`            varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文件集合',
    `code`              varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci  NOT NULL COMMENT '随机code',
    `background_images` json                                                                    DEFAULT NULL COMMENT '背景图',
    `full_name`         varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci           DEFAULT NULL COMMENT '姓名',
    `barrage`           varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci          DEFAULT NULL COMMENT '弹幕',
    `one_screen`        json                                                                    DEFAULT NULL COMMENT '一屏',
    `two_screen`        json                                                                    DEFAULT NULL COMMENT '二屏',
    `three_screen`      json                                                                    DEFAULT NULL COMMENT '三屏',
    `four_screen`       json                                                                    DEFAULT NULL COMMENT '四屏',
    `creator`           varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
    `create_time`       datetime                                                       NOT NULL DEFAULT CURRENT_TIMESTAMP 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 '更新时间',
    `deleted`           bit(1)                                                         NOT NULL DEFAULT b'0' COMMENT '是否删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'banner管理';


-- ----------------------------
-- Table structure for banner_log
-- ----------------------------
DROP TABLE IF EXISTS `banner_log`;
CREATE TABLE `banner_log`
(
    `id`          bigint                                                         NOT NULL AUTO_INCREMENT COMMENT 'id',
    `banner_id`   bigint                                                         NOT NULL COMMENT 'banner id',
    `content`     varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '内容',
    `creator`     varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
    `create_time` datetime                                                       NOT NULL DEFAULT CURRENT_TIMESTAMP 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 '更新时间',
    `deleted`     bit(1)                                                         NOT NULL DEFAULT b'0' COMMENT '是否删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'banner 历史';


-- ----------------------------
-- Table structure for banner_log
-- ----------------------------
DROP TABLE IF EXISTS `screen`;
CREATE TABLE `screen`
(
    `id`          bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
    `name`        varchar(256) COLLATE utf8mb4_unicode_ci           DEFAULT NULL COMMENT '名称',
    `images`      varchar(5000) COLLATE utf8mb4_unicode_ci          DEFAULT NULL COMMENT '图片',
    `content`     text COLLATE utf8mb4_unicode_ci COMMENT '内容',
    `url`         varchar(1024) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '链接',
    `creator`     varchar(64) COLLATE utf8mb4_unicode_ci            DEFAULT '' COMMENT '创建者',
    `create_time` datetime                                 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `updater`     varchar(64) COLLATE utf8mb4_unicode_ci            DEFAULT '' COMMENT '更新者',
    `update_time` datetime                                 NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    `deleted`     bit(1)                                   NOT NULL DEFAULT b'0' COMMENT '是否删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='大屏';
