SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

CREATE TABLE `core_config_enum`
(
    `id`          varchar(50) NOT NULL,
    `create_time` datetime    NOT NULL,
    `update_time` datetime    NOT NULL,
    `is_deleted`  int(6)      NOT NULL DEFAULT '0',
    `type`        varchar(50)          DEFAULT NULL COMMENT '类型',
    `name`        varchar(255)         DEFAULT NULL COMMENT '名称',
    `remark`      varchar(500)         DEFAULT NULL COMMENT '备注',
    `ext`         varchar(255)         DEFAULT NULL COMMENT '扩展字段',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='配置-枚举';


CREATE TABLE `core_config_system`
(
    `id`          varchar(50)  NOT NULL,
    `create_time` datetime     NOT NULL,
    `update_time` datetime     NOT NULL,
    `is_deleted`  int(4)       NOT NULL DEFAULT '0',
    `config_key`  varchar(255) NOT NULL,
    `config_val`  text,
    `config_type` int(6)       NOT NULL DEFAULT '0' COMMENT '类型:0-文本,1-图片,2-开关',
    `remark`      varchar(500)          DEFAULT NULL COMMENT '说明',
    `extra`       varchar(255)          DEFAULT NULL COMMENT '额外配置',
    `read_only`   int(6)       NOT NULL DEFAULT '0' COMMENT '0-否，1-是',
    PRIMARY KEY (`id`),
    UNIQUE KEY `uni_key` (`config_key`(50)) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='配置-系统';

-- ----------------------------
-- Table structure for core_config_func
-- ----------------------------
CREATE TABLE `core_config_func`
(
    `id`          varchar(50) NOT NULL,
    `create_time` datetime    NOT NULL,
    `update_time` datetime    NOT NULL,
    `is_deleted`  int(6)      NOT NULL DEFAULT '0',
    `service`     varchar(20)          DEFAULT NULL COMMENT '业务',
    `name`        varchar(255)         DEFAULT NULL COMMENT '名称',
    `remark`      varchar(500)         DEFAULT NULL COMMENT '其他说明',
    `is_used`     int(6)      NOT NULL DEFAULT '0' COMMENT '是否启用',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='职位-功能点';

SET FOREIGN_KEY_CHECKS = 1;
