/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50717
 Source Host           : 127.0.0.1:3306
 Source Schema         : calendar-center

 Target Server Type    : MySQL
 Target Server Version : 50717
 File Encoding         : 65001

 Date: 29/10/2021 14:01:04
*/

SET NAMES utf8mb4;
SET
FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for dye_basic
-- ----------------------------
DROP TABLE IF EXISTS `dye_basic`;
CREATE TABLE `dye_basic`
(
    `id`             varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci  NOT NULL,
    `group_code`     varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '集团编码',
    `project_id`     varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',
    `type_code`      varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '染色类型编码，对应rwd_def_funcid的type字段',
    `type_name`      varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci  NOT NULL COMMENT '染色类型名称',
    `season_code`    varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci  NOT NULL COMMENT '季节编码',
    `season_name`    varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci  NOT NULL COMMENT '季节名称',
    `create_time`    varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
    `update_time`    varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间',
    `update_user_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci  NOT NULL COMMENT '最后创建人ID',
    `is_delete`      varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否删除（0：否 1：是）',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '染色基础表' ROW_FORMAT = Dynamic;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for dye_rule_custom
-- ----------------------------
DROP TABLE IF EXISTS `dye_rule_custom`;
CREATE TABLE `dye_rule_custom`  (
                                    `id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
                                    `basic_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '基础表ID',
                                    `upper_limit` int(50) NOT NULL COMMENT '上限',
                                    `upper_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '上限符号',
                                    `lower_limit` int(50) NOT NULL COMMENT '下限',
                                    `lower_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '下限符号',
                                    `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
                                    `color_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '色值',
                                    `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
                                    `update_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改时间',
                                    `update_user_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '最后修改人ID',
                                    `is_delete` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否删除（0：否 1：是）',
                                    `order_num` int(10) NULL DEFAULT NULL COMMENT '排序',
                                    `num_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数值单位符号',
                                    PRIMARY KEY (`id`) USING BTREE,
                                    UNIQUE INDEX `id`(`id`) USING BTREE COMMENT '主键索引',
                                    INDEX `basic_id`(`basic_id`) USING BTREE COMMENT '外键索引',
                                    CONSTRAINT `fk_custom` FOREIGN KEY (`basic_id`) REFERENCES `dye_basic` (`id`) ON DELETE RESTRICT ON UPDATE NO ACTION
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '染色规则自定义表' ROW_FORMAT = Dynamic;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for dye_rule_default
-- ----------------------------
DROP TABLE IF EXISTS `dye_rule_default`;
CREATE TABLE `dye_rule_default`  (
                                     `id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
                                     `basic_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '染色基础表ID',
                                     `upper_limit` int(50) NOT NULL COMMENT '上限',
                                     `upper_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '上限符号',
                                     `lower_limit` int(50) NOT NULL COMMENT '下限',
                                     `lower_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '下限符号',
                                     `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
                                     `color_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '色值',
                                     `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
                                     `update_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间',
                                     `update_user_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '最后更新人ID',
                                     `is_delete` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否删除（0：否  1：是）',
                                     `order_num` int(10) NULL DEFAULT NULL COMMENT '排序',
                                     `num_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数值单位符号',
                                     PRIMARY KEY (`id`) USING BTREE,
                                     UNIQUE INDEX `id`(`id`) USING BTREE COMMENT '主键索引',
                                     INDEX `basic_id`(`basic_id`) USING BTREE COMMENT '外键索引',
                                     CONSTRAINT `fk_default` FOREIGN KEY (`basic_id`) REFERENCES `dye_basic` (`id`) ON DELETE RESTRICT ON UPDATE NO ACTION
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '默认染色规则' ROW_FORMAT = Dynamic;