REPLACE
INTO `authority_info` (`id`, `parent_id`, `name`, `remark`)
VALUES (2300, 0, 'popular.feelings', '舆情监控管理'),
       (2301, 2300, 'popular.feelings.find', '查询'),
       (2302, 2300, 'popular.feelings.add', '添加'),
       (2303, 2300, 'popular.feelings.edit', '修改'),
       (2304, 2300, 'popular.feelings.delete', '删除');


DROP TABLE IF EXISTS `popular_feelings`;
CREATE TABLE `popular_feelings`
(
    `id`           BIGINT(20) NOT NULL COMMENT 'ID',
    `site_name`    VARCHAR(50) NOT NULL COMMENT '网站名称',
    `keywords`     VARCHAR(50) NOT NULL COMMENT '监控关键词',
    `domain`       VARCHAR(50) NOT NULL COMMENT '域名',
    `start_urls`   VARCHAR(50) NOT NULL COMMENT '启动域名',
    `created_time` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
    `created_by`   BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
    `updated_time` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
    `updated_by`   BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
    PRIMARY KEY (`id`)
) COMMENT ='舆情监控管理' ENGINE = InnoDB;

DROP TABLE IF EXISTS `popular_feelings_page`;
CREATE TABLE `popular_feelings_page`
(
    `id`                  VARCHAR(50)  NOT NULL COMMENT 'ID',
    `popular_feelings_id` BIGINT(20) NOT NULL COMMENT '舆情监控ID',
    `url`                 VARCHAR(500) NOT NULL COMMENT 'URL地址',
    `title`               VARCHAR(500) NOT NULL COMMENT '标题',
    `keywords`            VARCHAR(500) NOT NULL COMMENT '关键词',
    `description`         VARCHAR(500) NOT NULL COMMENT '描述',
    `body_text`           LONGTEXT     NOT NULL COMMENT '网页文本',
    `html`                LONGTEXT     NOT NULL COMMENT '全文本HTML',
    `spider_time`         DATETIME NULL DEFAULT NULL COMMENT '采集时间',
    `update_time`         DATETIME NULL DEFAULT NULL COMMENT '更新采集时间',
    PRIMARY KEY (`id`)
) COMMENT ='舆情采集页面' ENGINE = InnoDB;
