/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50738
 Source Host           : localhost:3306
 Source Schema         : yangcai_design

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

 Date: 29/11/2023 08:38:16
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for after_pic_type
-- ----------------------------
DROP TABLE IF EXISTS `after_pic_type`;
CREATE TABLE `after_pic_type`  (
  `PIC_TYPE` bigint(20) NOT NULL,
  `PIC_TYPE_NAME` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PIC_STATUS` int(11) NOT NULL,
  PRIMARY KEY (`PIC_TYPE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for after_problem_type
-- ----------------------------
DROP TABLE IF EXISTS `after_problem_type`;
CREATE TABLE `after_problem_type`  (
  `PIC_TYPE` bigint(20) NOT NULL,
  `PROBLEM_TYPE` bigint(20) NOT NULL,
  `PROBLEM_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PROBLEM_STATUS` int(11) NOT NULL,
  PRIMARY KEY (`PROBLEM_TYPE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for api_invoke_log
-- ----------------------------
DROP TABLE IF EXISTS `api_invoke_log`;
CREATE TABLE `api_invoke_log`  (
  `INVOKE_LOG_ID` bigint(20) NOT NULL,
  `REMOTE_IP` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `STATUS_CODE` int(11) NOT NULL,
  `REMOTE_USER` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ERROR_ID` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `API_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `INVOKE_MESSAGE` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `INVOKE_STACK_TRACE` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`INVOKE_LOG_ID`) USING BTREE,
  INDEX `IX_INVOCK_IP`(`REMOTE_IP`) USING BTREE,
  INDEX `IX_REMOTE_USER`(`REMOTE_USER`) USING BTREE,
  INDEX `IX_API_NAME`(`API_NAME`) USING BTREE,
  INDEX `IX_USER_STATUS_TIME`(`REMOTE_USER`, `STATUS_CODE`, `CREATE_TIME`) USING BTREE,
  INDEX `IX_STATUS_CODE`(`STATUS_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for buyer_user
-- ----------------------------
DROP TABLE IF EXISTS `buyer_user`;
CREATE TABLE `buyer_user`  (
  `BUYER_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORDER_COUNT` int(11) NOT NULL,
  PRIMARY KEY (`BUYER_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for check_back_reason
-- ----------------------------
DROP TABLE IF EXISTS `check_back_reason`;
CREATE TABLE `check_back_reason`  (
  `REASON_ID` bigint(20) NOT NULL COMMENT '原因编号',
  `IS_REASON_TYPE` tinyint(1) NOT NULL COMMENT '1  原因分类  0具体原因项',
  `REASON_PARENT` bigint(20) NOT NULL COMMENT '具体原因项  所属分类',
  `REASON_TEXT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '原因内容',
  PRIMARY KEY (`REASON_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '印前原因预录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for complete_order_stat
-- ----------------------------
DROP TABLE IF EXISTS `complete_order_stat`;
CREATE TABLE `complete_order_stat`  (
  `DESIGNER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `COMPLETE_DATE` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORDER_PASS_ID` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ORDER_BACK_ID` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ORDER_PASS_SUM` int(11) NOT NULL,
  `ORDER_BACK_SUM` int(11) NOT NULL,
  `PASS_CONVERT_SUM` double(15, 1) NULL DEFAULT NULL,
  `BACK_CONVERT_SUM` double(15, 1) NULL DEFAULT NULL,
  PRIMARY KEY (`DESIGNER`, `COMPLETE_DATE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '定稿统计表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for config_questions
-- ----------------------------
DROP TABLE IF EXISTS `config_questions`;
CREATE TABLE `config_questions`  (
  `QUESTIONS_ID` bigint(20) NOT NULL,
  `DESIGN_REQUIREMENTS` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计要求',
  `MODIFICATION_TIME` datetime(0) NOT NULL COMMENT '最后修改时间',
  `UPDATE_OPERATOR` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员',
  PRIMARY KEY (`QUESTIONS_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统考试题库' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_dispatch_order_log
-- ----------------------------
DROP TABLE IF EXISTS `des_dispatch_order_log`;
CREATE TABLE `des_dispatch_order_log`  (
  `DESIGN_ID` bigint(20) NOT NULL,
  `DES_TIME` datetime(0) NOT NULL,
  `DIS_TYPE` tinyint(4) NOT NULL,
  `DIS_ORDER_STATUS` tinyint(4) NOT NULL,
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `INDUSTRY_ID` bigint(20) NOT NULL,
  `MONTH_CODE` varchar(6) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DAY_CODE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ORDER_TEXT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DIS_DESC` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DRAFT_TYPE` int(11) NOT NULL DEFAULT 2 COMMENT '稿件类型',
  PRIMARY KEY (`DESIGN_ID`, `DES_TIME`) USING BTREE,
  INDEX `idx_OPERATOR_CODE_status`(`DIS_ORDER_STATUS`, `OPERATOR_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_dispatch_property
-- ----------------------------
DROP TABLE IF EXISTS `des_dispatch_property`;
CREATE TABLE `des_dispatch_property`  (
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `MAJOR_TYPE` bigint(20) NOT NULL,
  `SECONDARY_TYPES` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MAJOR_INDUSTRY` bigint(20) NOT NULL,
  `SECONDARY_INDUSTRYS` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MAX_ORDER` int(11) NULL DEFAULT NULL,
  `DESIGNER_LEVEL` int(11) NOT NULL,
  `CONTACT` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ACCEPT_SUPPORT_ORDER` tinyint(4) NULL DEFAULT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  `UPDATE_TIME` datetime(0) NULL DEFAULT NULL,
  `SHOP_NICK` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `TYPESETTER` tinyint(4) NULL DEFAULT NULL COMMENT '是否为排版设计师 0为是',
  `TYPESET_AUDITOR` tinyint(4) NULL DEFAULT NULL COMMENT '是否为排版审核人 0为是',
  `FIRST_TYPESET_AUDITOR` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '第一排版审核人',
  `IS_DESIGN_ORDER` tinyint(1) NULL DEFAULT 1 COMMENT '是否支持设计订单',
  `IS_NORM_DRAFT_ORDER` tinyint(1) NULL DEFAULT 0 COMMENT '是否接取标准自来稿',
  `IS_DRAFT_ORDER` tinyint(1) NULL DEFAULT 0 COMMENT '是否支持改稿自来稿',
  `IS_HIGH_QUALITY_ORDER` tinyint(1) NULL DEFAULT NULL COMMENT '是否优质订单',
  `IS_URGENT` tinyint(1) NOT NULL,
  PRIMARY KEY (`OPERATOR_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师接单规则表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_keyword
-- ----------------------------
DROP TABLE IF EXISTS `des_keyword`;
CREATE TABLE `des_keyword`  (
  `CAT_ID` bigint(20) NULL DEFAULT NULL,
  `KEYWORD_ID` bigint(20) NOT NULL,
  `KEYWORD_NAME` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `KEYWORD_TYPE` int(11) NOT NULL,
  `OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`KEYWORD_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_keyword_cat
-- ----------------------------
DROP TABLE IF EXISTS `des_keyword_cat`;
CREATE TABLE `des_keyword_cat`  (
  `CAT_ID` bigint(20) NOT NULL,
  `CAT_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`CAT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_keyword_core
-- ----------------------------
DROP TABLE IF EXISTS `des_keyword_core`;
CREATE TABLE `des_keyword_core`  (
  `KEYWORD_NAME` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `KEYWORD_HOT` int(11) NOT NULL,
  `KEYWORD_NUM` int(11) NOT NULL,
  `KEYWORD_SCORE` int(11) NOT NULL,
  INDEX `idx_KEYWORD_NAME`(`KEYWORD_NAME`(255)) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_keyword_core_log
-- ----------------------------
DROP TABLE IF EXISTS `des_keyword_core_log`;
CREATE TABLE `des_keyword_core_log`  (
  `LOG_ID` bigint(20) NOT NULL,
  `DAY_CODE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `MONTH_CODE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `KEYWORD_NAME` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `KEYWORD_HOT` int(11) NULL DEFAULT NULL,
  `KEYWORD_NUM` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`LOG_ID`) USING BTREE,
  INDEX `IDX_MONTH_CODE`(`MONTH_CODE`) USING BTREE,
  INDEX `IDX_DAY_CODE`(`DAY_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_keyword_core_stat
-- ----------------------------
DROP TABLE IF EXISTS `des_keyword_core_stat`;
CREATE TABLE `des_keyword_core_stat`  (
  `DAY_CODE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `KEYWORD_NAME` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `MONTH_CODE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `KEYWORD_HOT` int(11) NOT NULL,
  `KEYWORD_NUM` int(11) NOT NULL,
  `KEYWORD_NUM_RANK` int(11) NOT NULL,
  `KEYWORD_HOT_RANK` int(11) NOT NULL,
  INDEX `idx_MONTH_CODE`(`MONTH_CODE`) USING BTREE,
  INDEX `idx_KEYWORD_NAME`(`KEYWORD_NAME`(255)) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_keyword_index
-- ----------------------------
DROP TABLE IF EXISTS `des_keyword_index`;
CREATE TABLE `des_keyword_index`  (
  `MEDIA_ID` bigint(20) NOT NULL,
  `LABEL_KEYWORD` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `CUSTOM_LABEL_KEYWORD` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `LONG_TAIL_KEYWORD` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `MEDIA_SCORE` int(11) NULL DEFAULT 0,
  PRIMARY KEY (`MEDIA_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_keyword_industry
-- ----------------------------
DROP TABLE IF EXISTS `des_keyword_industry`;
CREATE TABLE `des_keyword_industry`  (
  `INDUSTRY_ID` bigint(20) NOT NULL,
  `INDUSTRY_SUB_ID` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `INDUSTRY_KEYWORD` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_keyword_log
-- ----------------------------
DROP TABLE IF EXISTS `des_keyword_log`;
CREATE TABLE `des_keyword_log`  (
  `LOG_ID` bigint(20) NOT NULL,
  `KEYWORD_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  `SEARCH_COUNT` int(11) NULL DEFAULT 0,
  PRIMARY KEY (`LOG_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_label_attribute
-- ----------------------------
DROP TABLE IF EXISTS `des_label_attribute`;
CREATE TABLE `des_label_attribute`  (
  `ATTRIBUTE_ID` bigint(20) NOT NULL,
  `ATTRIBUTE_CAT_ID` bigint(20) NOT NULL,
  `INDUSTRY_ID` bigint(20) NOT NULL,
  `ATTRIBUTE_NAME` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`ATTRIBUTE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_label_attribute_cat
-- ----------------------------
DROP TABLE IF EXISTS `des_label_attribute_cat`;
CREATE TABLE `des_label_attribute_cat`  (
  `ATTRIBUTE_CAT_ID` bigint(20) NOT NULL,
  `INDUSTRY_ID` bigint(20) NOT NULL,
  `ATTRIBUTE_CAT_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`ATTRIBUTE_CAT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_label_industry
-- ----------------------------
DROP TABLE IF EXISTS `des_label_industry`;
CREATE TABLE `des_label_industry`  (
  `INDUSTRY_ID` bigint(20) NOT NULL,
  `INDUSTRY_SUB_ID` bigint(20) NOT NULL,
  `INDUSTRY_SUB_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`INDUSTRY_SUB_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_material_cat
-- ----------------------------
DROP TABLE IF EXISTS `des_material_cat`;
CREATE TABLE `des_material_cat`  (
  `CAT_ID` bigint(20) NOT NULL,
  `CAT_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CAT_STATUS` tinyint(4) NOT NULL,
  `CAT_SEQ` int(11) NOT NULL,
  PRIMARY KEY (`CAT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_mer_dispatch_log
-- ----------------------------
DROP TABLE IF EXISTS `des_mer_dispatch_log`;
CREATE TABLE `des_mer_dispatch_log`  (
  `ORG_ID` bigint(20) NOT NULL,
  `DESIGN_ID` bigint(20) NOT NULL,
  `DES_TIME` datetime(0) NOT NULL,
  `DIS_DESC` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ANALYSIS_TEXT` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '分拣分析结果内容',
  PRIMARY KEY (`DESIGN_ID`, `DES_TIME`) USING BTREE,
  INDEX `IX_DESIGN_ID`(`DESIGN_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_online
-- ----------------------------
DROP TABLE IF EXISTS `des_online`;
CREATE TABLE `des_online`  (
  `ORG_ID` bigint(20) NOT NULL,
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ONLINE_STATUS` int(11) NOT NULL,
  `ORDER_NUM` int(11) NOT NULL,
  `SESSION_ID` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `SESSION_TIME` datetime(0) NULL DEFAULT NULL,
  `LAST_DRAFT_TYPE` bigint(20) NOT NULL,
  `LAST_DRAFT_TIME` datetime(0) NULL DEFAULT NULL,
  `DESIGNER_LEVEL` int(11) NULL DEFAULT NULL,
  `LAST_UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '接单状态更新时间',
  PRIMARY KEY (`OPERATOR_CODE`) USING BTREE,
  INDEX `IDX_ONLINE_STATUS`(`ONLINE_STATUS`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师接单状态表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_online_time
-- ----------------------------
DROP TABLE IF EXISTS `des_online_time`;
CREATE TABLE `des_online_time`  (
  `DAY_CODE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ONLINE_TIME` int(11) NOT NULL,
  PRIMARY KEY (`DAY_CODE`, `OPERATOR_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_score_param
-- ----------------------------
DROP TABLE IF EXISTS `des_score_param`;
CREATE TABLE `des_score_param`  (
  `SCORE_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SCORE_TYPE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_ID` bigint(20) NOT NULL,
  `PARAM_TYPE` int(11) NULL DEFAULT NULL,
  `PARAM_KEY` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_VALUE` int(11) NOT NULL,
  PRIMARY KEY (`PARAM_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_score_weight
-- ----------------------------
DROP TABLE IF EXISTS `des_score_weight`;
CREATE TABLE `des_score_weight`  (
  `SCORE_ID` bigint(20) NOT NULL,
  `SCORE_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DAY_CODE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SCORE_TYPE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SCORE_WEIGHT` int(11) NOT NULL,
  `SCORE_VALUE` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`SCORE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_template_event
-- ----------------------------
DROP TABLE IF EXISTS `des_template_event`;
CREATE TABLE `des_template_event`  (
  `EVENT_ID` bigint(20) NOT NULL,
  `MEDIA_ID` bigint(20) NOT NULL,
  `EVENT_TYPE` int(11) NOT NULL,
  `OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`EVENT_ID`) USING BTREE,
  INDEX `idx_MEDIA_ID`(`MEDIA_ID`) USING BTREE,
  INDEX `idx_OPERATOR_CODE`(`OPERATOR_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_template_log
-- ----------------------------
DROP TABLE IF EXISTS `des_template_log`;
CREATE TABLE `des_template_log`  (
  `LOG_ID` bigint(20) NOT NULL,
  `MEDIA_ID` bigint(20) NOT NULL,
  `OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `LOG_DESC` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`LOG_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_template_order
-- ----------------------------
DROP TABLE IF EXISTS `des_template_order`;
CREATE TABLE `des_template_order`  (
  `DESIGN_ID` bigint(20) NOT NULL,
  `MEDIA_ID` bigint(20) NULL DEFAULT NULL,
  `OLD_PARAM_TEXT` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OCR_TEXT` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `PARAM_TEXT` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `QR_CODE_PATH` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `FILE_ID` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DESIGN_MEDIA_ID` bigint(20) NULL DEFAULT NULL,
  `TYPE_ID` bigint(20) NULL DEFAULT NULL,
  `INDUSTRY_ID` bigint(20) NULL DEFAULT NULL,
  `OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`DESIGN_ID`) USING BTREE,
  INDEX `idx_MEDIA_ID`(`MEDIA_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单模板参数表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_template_score
-- ----------------------------
DROP TABLE IF EXISTS `des_template_score`;
CREATE TABLE `des_template_score`  (
  `MEDIA_ID` bigint(20) NOT NULL,
  `BASE_SCORE` int(11) NOT NULL,
  `FLOAT_SCORE` int(11) NOT NULL,
  `SALE_SCORE` int(11) NOT NULL,
  `USER_SCORE` int(11) NOT NULL,
  PRIMARY KEY (`MEDIA_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_template_score_log
-- ----------------------------
DROP TABLE IF EXISTS `des_template_score_log`;
CREATE TABLE `des_template_score_log`  (
  `LOG_ID` bigint(20) NOT NULL,
  `MEDIA_ID` bigint(20) NOT NULL,
  `SCORE_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `SCORE_TYPE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_TYPE` int(11) NOT NULL,
  `PARAM_KEY` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_VALUE` int(11) NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`LOG_ID`) USING BTREE,
  INDEX `IDX_CREATE_TIME`(`CREATE_TIME`) USING BTREE,
  INDEX `IDX_MEDIA_ID`(`MEDIA_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_work_search_log
-- ----------------------------
DROP TABLE IF EXISTS `des_work_search_log`;
CREATE TABLE `des_work_search_log`  (
  `LOG_ID` bigint(20) NOT NULL,
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  `OPR_DESC` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `LOG_TYPE` int(11) NULL DEFAULT NULL COMMENT '操作日志类型, 0=登录系统, 1=停止接单，2 正在接单，3=退出浏览器',
  PRIMARY KEY (`LOG_ID`) USING BTREE,
  INDEX `IDX_CREATE_TIME`(`CREATE_TIME`) USING BTREE,
  INDEX `IDX_OPERATOR_CODE`(`OPERATOR_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_works_event
-- ----------------------------
DROP TABLE IF EXISTS `des_works_event`;
CREATE TABLE `des_works_event`  (
  `EVENT_ID` bigint(20) NOT NULL,
  `WORKS_ID` bigint(20) NOT NULL,
  `EVENT_TYPE` int(11) NOT NULL,
  `OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`EVENT_ID`) USING BTREE,
  INDEX `indx_EVENT_TYPE`(`EVENT_TYPE`) USING BTREE,
  INDEX `indx_WORKS_ID`(`WORKS_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_works_file
-- ----------------------------
DROP TABLE IF EXISTS `des_works_file`;
CREATE TABLE `des_works_file`  (
  `WORKS_ID` bigint(20) NOT NULL,
  `INDUSTRY_ID` bigint(20) NULL DEFAULT NULL,
  `PRD_TYPE_ID` bigint(20) NOT NULL,
  `WORKS_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `WORKS_TYPE` int(11) NULL DEFAULT NULL,
  `CDR_FILE_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PDF_FILE_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CDR_PATH` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PDF_PATH` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DESIGNER` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DESIGN_GROUP_ID` varchar(850) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DEPT_ID` varchar(850) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `THUMB_IMAGE_PATH` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  `PRD_PAGE_ID` bigint(20) NULL DEFAULT NULL,
  `PRD_SIZE_ID` bigint(20) NULL DEFAULT NULL,
  `TEMPLATE_ID` bigint(20) NULL DEFAULT NULL,
  `INDUSTRY_SUB_IDS` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `INDUSTRY_SUB_NAME` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ATTRIBUTE_IDS` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ATTRIBUTE_NAME` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `KEYWORD_ID` bigint(20) NULL DEFAULT NULL,
  `KEYWORD_NAME` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `THUMB_IMAGE_PHY_PATH` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `THUMB_IMAGE_OSS_URL` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `UPLOAD_TYPE` int(11) NULL DEFAULT NULL,
  `OSS_STATUS` int(11) NULL DEFAULT NULL,
  `FILE_TYPE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设计文件类型后缀。pdf、cdr、ai',
  PRIMARY KEY (`WORKS_ID`) USING BTREE,
  INDEX `indx_DESIGNER`(`DESIGNER`) USING BTREE,
  INDEX `indx_CREATE_TIME`(`CREATE_TIME`) USING BTREE,
  INDEX `indx_INDUSTRY_ID`(`INDUSTRY_ID`) USING BTREE,
  INDEX `indx_PRD_TYPE_ID`(`PRD_TYPE_ID`) USING BTREE,
  INDEX `IDX_TEMPLATE_ID`(`TEMPLATE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_works_file_keyword
-- ----------------------------
DROP TABLE IF EXISTS `des_works_file_keyword`;
CREATE TABLE `des_works_file_keyword`  (
  `WORKS_ID` bigint(20) NOT NULL,
  `KEYWORD_ID` bigint(20) NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`WORKS_ID`, `KEYWORD_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_works_file_label
-- ----------------------------
DROP TABLE IF EXISTS `des_works_file_label`;
CREATE TABLE `des_works_file_label`  (
  `WORKS_ID` bigint(20) NOT NULL,
  `PRD_TYPE_ID` bigint(20) NOT NULL,
  `INDUSTRY_ID` bigint(20) NOT NULL,
  `KEYWORD_ID` bigint(20) NULL DEFAULT NULL,
  `INDUSTRY_SUB_IDS` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `ATTRIBUTE_IDS` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`WORKS_ID`) USING BTREE,
  INDEX `WORKS_ID`(`WORKS_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_works_keyword
-- ----------------------------
DROP TABLE IF EXISTS `des_works_keyword`;
CREATE TABLE `des_works_keyword`  (
  `CAT_ID` bigint(20) NULL DEFAULT NULL,
  `KEYWORD_ID` bigint(20) NOT NULL,
  `KEYWORD_NAME` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `KEYWORD_TYPE` int(11) NOT NULL,
  `OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`KEYWORD_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_works_keyword_cat
-- ----------------------------
DROP TABLE IF EXISTS `des_works_keyword_cat`;
CREATE TABLE `des_works_keyword_cat`  (
  `CAT_ID` bigint(20) NOT NULL,
  `CAT_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`CAT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for des_works_label
-- ----------------------------
DROP TABLE IF EXISTS `des_works_label`;
CREATE TABLE `des_works_label`  (
  `LABEL_ID` bigint(20) NOT NULL,
  `LABEL_PARENT_ID` bigint(20) NOT NULL,
  `LABEL_NAME` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `LABEL_TYPE` int(11) NOT NULL,
  `LABEL_LEVEL` int(11) NOT NULL,
  `LABEL_CREATER` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `LABEL_ORDER` int(11) NOT NULL,
  PRIMARY KEY (`LABEL_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_after_order
-- ----------------------------
DROP TABLE IF EXISTS `design_after_order`;
CREATE TABLE `design_after_order`  (
  `DESIGN_AFS_ID` bigint(20) NOT NULL,
  `OUT_AFS_ID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DESIGN_ID` bigint(20) NOT NULL,
  `LOSS_AMOUNT` decimal(6, 2) NOT NULL,
  `COMPENSATE_AMOUNT` decimal(6, 2) NULL DEFAULT NULL COMMENT '赔付金额',
  `AFTER_STATUS` int(11) NOT NULL,
  `NEW_DESIGN_ID` bigint(20) NULL DEFAULT NULL,
  `PIC_ORG_ID` bigint(20) NULL DEFAULT NULL,
  `PIC_TYPE` bigint(20) NULL DEFAULT NULL,
  `PROBLEM_TYPE` bigint(20) NULL DEFAULT NULL,
  `PROBLEM_REASON` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '售后问题原因',
  `PROBLEM_DESC` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '售后问题详细描述',
  `AFTER_CREATE_TIME` datetime(0) NOT NULL,
  `AFTER_MODIFY_TIME` datetime(0) NOT NULL,
  `AFTER_BLAMER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_RETURN_NOTE` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_BLAME_RETURN_NOTE` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_BLAME_RETURN_TIME` datetime(0) NULL DEFAULT NULL,
  `AFTER_HANDLER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_HANDEL_TIME` datetime(0) NULL DEFAULT NULL,
  `AFTER_FINISH_NOTE` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_FINISH_TIME` datetime(0) NULL DEFAULT NULL,
  `AFTER_CANCELER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_CANCEL_TIME` datetime(0) NULL DEFAULT NULL,
  `AFTER_CANCEL_NOTE` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_COMPLAIN_CHECK_NOTE` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`DESIGN_AFS_ID`) USING BTREE,
  INDEX `IX_DESIGN_ID`(`DESIGN_ID`) USING BTREE,
  INDEX `IX_PROBLEM_REASON`(`PROBLEM_REASON`) USING BTREE,
  INDEX `IX_AFTER_CREATE_TIME`(`AFTER_CREATE_TIME`, `AFTER_STATUS`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '售后订单总表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_after_statistic_detail
-- ----------------------------
DROP TABLE IF EXISTS `design_after_statistic_detail`;
CREATE TABLE `design_after_statistic_detail`  (
  `START_DATE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DESIGN_AFS_ID` bigint(20) NOT NULL,
  `OUT_AFS_ID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DESIGN_ID` bigint(20) NOT NULL,
  `LOSS_AMOUNT` decimal(6, 2) NOT NULL,
  `AFTER_STATUS` int(11) NOT NULL,
  `NEW_DESIGN_ID` bigint(20) NULL DEFAULT NULL,
  `PIC_ORG_ID` bigint(20) NULL DEFAULT NULL,
  `PIC_TYPE` bigint(20) NULL DEFAULT NULL,
  `PROBLEM_TYPE` bigint(20) NULL DEFAULT NULL,
  `PROBLEM_DESC` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `AFTER_CREATE_TIME` datetime(0) NOT NULL,
  `AFTER_MODIFY_TIME` datetime(0) NOT NULL,
  `AFTER_BLAMER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_RETURN_NOTE` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_BLAME_RETURN_NOTE` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_BLAME_RETURN_TIME` datetime(0) NULL DEFAULT NULL,
  `AFTER_HANDLER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_HANDEL_TIME` datetime(0) NULL DEFAULT NULL,
  `AFTER_FINISH_NOTE` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_FINISH_TIME` datetime(0) NULL DEFAULT NULL,
  `AFTER_CANCELER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_CANCEL_TIME` datetime(0) NULL DEFAULT NULL,
  `AFTER_CANCEL_NOTE` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_COMPLAIN_CHECK_NOTE` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MERCHANT_ID` bigint(20) NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `OUT_ID` bigint(20) NOT NULL,
  `ORDER_TEXT` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_NAMES` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AMOUNT` bigint(20) NOT NULL,
  `PRINT_SPECIAL` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `TYPE_ID` bigint(20) NOT NULL,
  `SHOP_NICK` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DESIGNER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `BUYER_NICK` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `USER_CONTACT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `USER_MOBILE` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `USER_QQ` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `USER_WX` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`START_DATE`, `DESIGN_AFS_ID`) USING BTREE,
  INDEX `IX_AFTER_FINISH_TIME`(`AFTER_FINISH_TIME`) USING BTREE,
  INDEX `IX_DESIGN_ID`(`DESIGN_ID`) USING BTREE,
  INDEX `IX_ORG_ID`(`ORG_ID`) USING BTREE,
  INDEX `IX_AFTER_BLAMER`(`AFTER_BLAMER`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_atta
-- ----------------------------
DROP TABLE IF EXISTS `design_atta`;
CREATE TABLE `design_atta`  (
  `ATTA_ID` bigint(20) NOT NULL,
  `DESIGN_ID` bigint(20) NOT NULL,
  `ATTA_MODUL` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_TYPE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SAVE_PATH` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OSS_TYPE` int(11) NOT NULL,
  `ATTA_FLAG` int(11) NOT NULL,
  `OSS_URL` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `FILE_SIZE` bigint(20) NOT NULL,
  `FILEID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `UPLOAD_TIME` datetime(0) NOT NULL,
  `NOT_EXISTS_LOCAL_FILE` int(11) NULL DEFAULT NULL COMMENT '是否存在本地文件 =0或者=null 表示本地文件存在 =1 表示不存在',
  PRIMARY KEY (`ATTA_ID`) USING BTREE,
  INDEX `IX_DESIGN_ID`(`DESIGN_ID`) USING BTREE,
  INDEX `ix_ATTA_MODUL`(`ATTA_MODUL`) USING BTREE,
  INDEX `IX_OSS_TYPE_EXISTS_FILE`(`OSS_TYPE`, `ATTA_FLAG`, `NOT_EXISTS_LOCAL_FILE`) USING BTREE,
  INDEX `IX_UPLOAD_TIME`(`UPLOAD_TIME`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_complain
-- ----------------------------
DROP TABLE IF EXISTS `design_complain`;
CREATE TABLE `design_complain`  (
  `COMPLAIN_ID` bigint(20) NOT NULL COMMENT '投诉id',
  `DESIGN_ID` bigint(20) NOT NULL COMMENT '设计订单编号',
  `COMPLAIN_STATUS` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '投诉状态',
  `COMPLAIN_TYPE` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '投诉类型',
  `DISPOSE_PROJECT` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '处理方案',
  `SHOP_PUNISH_SCORE` int(11) NULL DEFAULT NULL COMMENT '店铺扣罚分数',
  `UNDERTAKE_DEPT` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '责任部门',
  `UNDERTAKE_PERSON` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '责任人',
  `UNDERTAKE_DEPT_MANAGER` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '责任主管',
  `UNDERTAKE_ORG` bigint(20) NULL DEFAULT 0 COMMENT '责任组织',
  `UNDERTAKE_ORG_NAME` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '责任组织名称',
  `ASSIST_PERSON` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '协助人',
  `ASSIST_DEPT_MANAGER` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '协助主管',
  `ASSIST_ORG` bigint(20) NULL DEFAULT 0 COMMENT '协助组织',
  `ASSIST_ORG_NAME` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '协助组织名称',
  `IS_SATRAP_ASSIST` tinyint(1) NULL DEFAULT NULL COMMENT '是否需要主管协助,0不需要,1需要',
  `COMPLAIN_SPECIFIC_TEXT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '投诉具体描述',
  `DISPOSE_IMG_PATH` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '投诉单处理图片路径',
  `FINISH_IMG_PATH` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '投诉单完结图片路径',
  `COMPLAIN_ADD_NAME` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '投诉单受理人',
  `COMPLAIN_ADD_TIME` datetime(0) NOT NULL COMMENT '投诉单受理时间',
  `COMPLAIN_MODIFY_TIME` datetime(0) NULL DEFAULT NULL COMMENT '最新修改时间',
  PRIMARY KEY (`COMPLAIN_ID`) USING BTREE,
  INDEX `idex_DESIGN_ID`(`DESIGN_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '投诉单表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_editor_user
-- ----------------------------
DROP TABLE IF EXISTS `design_editor_user`;
CREATE TABLE `design_editor_user`  (
  `editor_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编辑器id',
  `user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NULL DEFAULT NULL COMMENT '用户名',
  `mobile` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NULL DEFAULT NULL COMMENT '用户手机号码',
  `head_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NULL DEFAULT NULL COMMENT '头像地址',
  `type` int(11) NULL DEFAULT NULL COMMENT '1设计平台用户，2手机端用户',
  PRIMARY KEY (`editor_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3003 CHARACTER SET = utf8 COLLATE = utf8_unicode_520_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_group
-- ----------------------------
DROP TABLE IF EXISTS `design_group`;
CREATE TABLE `design_group`  (
  `GROUP_ID` bigint(20) NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `GROUP_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `GROUP_LEADER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `GROUP_SEQ` int(11) NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`GROUP_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_industry
-- ----------------------------
DROP TABLE IF EXISTS `design_industry`;
CREATE TABLE `design_industry`  (
  `INDUSTRY_ID` bigint(20) NOT NULL,
  `INDUSTRY_NAME` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `INDUSTRY_KEYWORDS` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `INDUSTRY_SEQ` int(11) NOT NULL,
  `IS_ENABLED` tinyint(4) NULL DEFAULT NULL,
  PRIMARY KEY (`INDUSTRY_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_merchant
-- ----------------------------
DROP TABLE IF EXISTS `design_merchant`;
CREATE TABLE `design_merchant`  (
  `MERCHANT_ID` bigint(20) NOT NULL,
  `MERCHANT_NAME` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `MERCHANT_SECRET` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `IS_ENABLED` tinyint(1) NOT NULL,
  PRIMARY KEY (`MERCHANT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_notice
-- ----------------------------
DROP TABLE IF EXISTS `design_notice`;
CREATE TABLE `design_notice`  (
  `id` bigint(20) NOT NULL,
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `content` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `add_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `add_time` datetime(0) NULL DEFAULT NULL,
  `update_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `update_time` datetime(0) NULL DEFAULT NULL,
  `create_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `status` int(1) NULL DEFAULT NULL COMMENT '状态：草稿=0；已发布=1；已下线=2；',
  `finsh_time` datetime(0) NULL DEFAULT NULL COMMENT '发布时间',
  `finsh_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '公告管理表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_order
-- ----------------------------
DROP TABLE IF EXISTS `design_order`;
CREATE TABLE `design_order`  (
  `DESIGN_ID` bigint(20) NOT NULL,
  `MERCHANT_ID` bigint(20) NOT NULL,
  `OUT_ID` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `STATUS` int(11) NOT NULL,
  `SHOW_RED_MARK` int(11) NULL DEFAULT 0 COMMENT '淘宝申请退款显示红色感叹号[0-不显示，1-显示]',
  `ORDER_TEXT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `AMOUNT` bigint(20) NOT NULL,
  `TYPE_ID` bigint(20) NOT NULL,
  `INDUSTRY_ID` bigint(20) NULL DEFAULT NULL,
  `DRAFT_TYPE` int(11) NOT NULL,
  `IS_URGENT` tinyint(1) NOT NULL,
  `DESIGN_PAGE` int(11) NOT NULL,
  `DESIGN_WIDTH` decimal(10, 2) NOT NULL,
  `DESIGN_HEIGHT` decimal(10, 2) NOT NULL,
  `PRINT_WIDTH` decimal(10, 2) NOT NULL,
  `PRINT_HEIGHT` decimal(10, 2) NOT NULL,
  `PRINT_KS` int(11) NOT NULL,
  `PRINT_MS` int(11) NOT NULL,
  `USER_CONTACT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `USER_MOBILE` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `AFTER_NAMES` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `PRINT_SPECIAL` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `BUYER_NICK` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `USER_TEXT` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `USER_NOTICE` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `USER_QQ` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `USER_WX` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `USER_TEXT_REPLACE` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `REMINDER_NUM` int(11) NOT NULL,
  `SHOP_NICK` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ORG_ID` bigint(20) NULL DEFAULT NULL,
  `ORG_RECEIVE_TIME` datetime(0) NULL DEFAULT NULL,
  `RECEIVE_TYPE` int(11) NULL DEFAULT NULL,
  `ORDER_FLAG` int(11) NOT NULL,
  `DESIGNER` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DESIGN_RECEIVE_TIME` datetime(0) NULL DEFAULT NULL,
  `DESIGN_BEGIN_TIME` datetime(0) NULL DEFAULT NULL,
  `DESIGN_DRAFT_TIME` datetime(0) NULL DEFAULT NULL,
  `DESIGN_END_TIME` datetime(0) NULL DEFAULT NULL,
  `DESIGN_PAUSE_REASON` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DESIGN_PAUSE_TIME` datetime(0) NULL DEFAULT NULL,
  `DESIGN_EXCLUDE` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DESIGN_REQUEST_REASON` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `REQUEST_TIME` datetime(0) NULL DEFAULT NULL,
  `DESIGN_REJECT_REASON` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DESIGN_KEEP_DURATION` int(11) NOT NULL,
  `REQUEST_REFOUND_ACCEPT_REASON` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `REFUND_TIME` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CHECKER` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CHECK_TIME` datetime(0) NULL DEFAULT NULL,
  `CHECK_BACK_REASON` varchar(1200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CHECK_BACK_PICTURE_URL` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `PREPRESS_BACK_REASON` varchar(1200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CANCELER` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CANCEL_TIME` datetime(0) NULL DEFAULT NULL,
  `CANCEL_REASON` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  `MODIFY_TIME` datetime(0) NOT NULL,
  `RE_DESIGN_SRC_ID` bigint(20) NULL DEFAULT NULL,
  `RE_DESIGN_CREATE_NOTE` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `COMPLAINT_REASON` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `COMPLAINT_FLAG` int(11) NOT NULL DEFAULT 0,
  `COMPLAINT_BACK_REASON` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `SERVICES_MESSAGE` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `QC_TIME` datetime(0) NULL DEFAULT NULL,
  `QC_FLAG` int(1) NULL DEFAULT 0,
  `IS_OLD_USER` int(11) NULL DEFAULT NULL COMMENT '是否老用户',
  `DESIGN_COPIES` int(11) NULL DEFAULT 0 COMMENT '设计费份数',
  `RECEIVER_NAME` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收货人名称',
  `RECEIVER_MOBILE` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收货人的手机号码',
  `RECEIVER_STATE` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收货人所在省份',
  `RECEIVER_CITY` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收货人所在城市',
  `RECEIVER_DISTRICT` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收货人所在区县',
  `RECEIVER_ADDRESS` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收货人详细地址',
  `TYPESET_AUDITOR` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '排版审核人',
  `GOTO_TYPESET_TIME` datetime(0) NULL DEFAULT NULL COMMENT '前去排版时间',
  `SUBMIT_TYPESET_TIME` datetime(0) NULL DEFAULT NULL COMMENT '提交排版时间',
  `EXPRESS_CODE` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物流code',
  `CREATER` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '录单人',
  `ORDER_SRC` int(11) NULL DEFAULT 0 COMMENT '订单来源，0:原订单，1:售后补单，2：售后赠单，3：微商单',
  `TIDS` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '淘宝单号，多个逗号分隔',
  `IS_ONLY_DESIGN` tinyint(1) NOT NULL COMMENT '是否仅设计',
  `IS_HIGH_QUALITY_ORDER` tinyint(1) NULL DEFAULT NULL COMMENT '是否优质订单',
  `IS_TIME_OUT_REMIND` int(4) NULL DEFAULT 0 COMMENT '是否已进行设计订单超时提醒',
  `DESIGN_PRICE` bigint(20) NULL DEFAULT 0 COMMENT '设计师佣金',
  `TEMPLATE_ID` int(11) NULL DEFAULT NULL COMMENT '编辑器模板id',
  `FILE_FAIL_MSG` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件错误原因',
  `RETURN_MSG` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '退货信息',
  `RETURN_MSG_TIME` datetime(0) NULL DEFAULT NULL COMMENT '退货信息时间',
  `RETURN_AFTER_STATUS` int(255) NULL DEFAULT NULL,
  `IS_CHANGE` tinyint(1) NULL DEFAULT NULL COMMENT '是否改稿',
  `IS_BACK` tinyint(1) NULL DEFAULT NULL COMMENT '是否退回',
  `ROOM_ID` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`DESIGN_ID`) USING BTREE,
  INDEX `IDX_STATUS_CREATE_TIME`(`CREATE_TIME`, `STATUS`, `ORG_ID`) USING BTREE,
  INDEX `IDX_DESIGN_END_TIME`(`STATUS`, `DESIGN_END_TIME`) USING BTREE,
  INDEX `IDX_OUT_ID`(`OUT_ID`) USING BTREE,
  INDEX `IDX_USER_MOBILE`(`USER_MOBILE`) USING BTREE,
  INDEX `IDX_CHECK_TIME`(`STATUS`, `CHECK_TIME`) USING BTREE,
  INDEX `IDX_ORG_ID_STATUS_DESIGNER_RECEIVETIME`(`DESIGN_RECEIVE_TIME`, `STATUS`, `ORG_ID`, `DESIGNER`) USING BTREE,
  INDEX `IDX_BUYER_NICK`(`BUYER_NICK`) USING BTREE,
  INDEX `IDX_DESIGN_DRAFT_TIME`(`STATUS`, `DESIGN_DRAFT_TIME`) USING BTREE,
  INDEX `IDX_REFUND_TIME`(`REFUND_TIME`, `DESIGNER`, `CREATE_TIME`) USING BTREE,
  INDEX `IDX_DESIGNER`(`DESIGNER`) USING BTREE,
  INDEX `IDX_DESIGN_BEGIN_TIME`(`DESIGN_BEGIN_TIME`) USING BTREE,
  INDEX `IDX_MODIFY_TIME`(`MODIFY_TIME`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计订单表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_order_merits
-- ----------------------------
DROP TABLE IF EXISTS `design_order_merits`;
CREATE TABLE `design_order_merits`  (
  `merits_id` bigint(20) NOT NULL COMMENT 'id',
  `DESIGN_ID` bigint(20) NOT NULL COMMENT '设订单编号，设计平台独立编号',
  `type` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NOT NULL COMMENT '修改绩效类型1:设计份数;2:重置佣金;3:修改佣金;4:修改加急费;5:修改稿件类型6:修改稿件类型时候重新算价',
  `old_data` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NULL DEFAULT NULL COMMENT '老数据',
  `new_data` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NULL DEFAULT NULL COMMENT '现数据',
  `add_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NOT NULL COMMENT '添加人',
  `add_time` datetime(0) NOT NULL COMMENT '添加时间',
  `designer` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NULL DEFAULT NULL COMMENT '设计师',
  `STATUS` int(11) NOT NULL COMMENT '订单状态',
  `ORDER_TEXT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单描述',
  `TYPE_ID` bigint(20) NOT NULL COMMENT '设计类型，名片、彩页、等等',
  `old_price` bigint(20) NULL DEFAULT NULL COMMENT '老价格',
  `new_price` bigint(20) NULL DEFAULT NULL COMMENT '新价格',
  PRIMARY KEY (`merits_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_520_ci COMMENT = '订单修改绩效记录保存' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_order_refund_reason
-- ----------------------------
DROP TABLE IF EXISTS `design_order_refund_reason`;
CREATE TABLE `design_order_refund_reason`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '退款原因',
  `update_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计订单退款原因配置表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_org_mer
-- ----------------------------
DROP TABLE IF EXISTS `design_org_mer`;
CREATE TABLE `design_org_mer`  (
  `ORG_ID` bigint(20) NOT NULL,
  `MER_STATUS` int(11) NOT NULL,
  `DESIGN_TYPE_IDS` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `INDUSTRY_IDS` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MER_MAX_ORDER` int(11) NOT NULL,
  `MER_MAX_WAIT_ORDER` int(11) NOT NULL,
  `PERSONAL_MAX_ORDER` int(11) NOT NULL,
  `MAX_ORDER_AMOUNT` bigint(20) NOT NULL,
  `MIN_ORDER_AMOUNT` bigint(20) NULL DEFAULT 0 COMMENT '订单最小金额',
  `MER_LEVEL` int(11) NOT NULL,
  `MER_DESPATCH_TYPE` int(11) NULL DEFAULT NULL,
  `IS_URGENT` tinyint(1) NOT NULL,
  `IS_PAUSE_RECIEIVE` tinyint(1) NOT NULL,
  `POLICY_JSONS` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `PAPER_JSONS` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `AFTER_NAMES` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `IS_DESIGN_ORDER` tinyint(1) NULL DEFAULT 1 COMMENT '是否接取普通设计订单',
  `IS_SENIOR_DESIGN_ORDER` tinyint(1) NULL DEFAULT 0 COMMENT '是否接取资深设计订单',
  `IS_NORM_DRAFT_ORDER` tinyint(1) NULL DEFAULT 0 COMMENT '是否接取标准自来稿',
  `IS_DRAFT_ORDER` tinyint(1) NULL DEFAULT NULL COMMENT '是否支持改稿自来稿',
  `DRAFT_MAX_ORDER` int(11) NULL DEFAULT NULL COMMENT '自来稿同时最大接单量',
  `IS_HIGH_QUALITY_ORDER` tinyint(1) NULL DEFAULT NULL COMMENT '是否优质订单',
  `MER_MAX_ORDINARY_ORDER` int(11) NULL DEFAULT NULL COMMENT '商户普通订单最大未领单量',
  `PERSONAL_MAX_ORDINARY_ORDER` int(11) NULL DEFAULT NULL COMMENT '个人普通订单最大接单量',
  `MODIFY_OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MODIFY_TIME` datetime(0) NULL DEFAULT NULL,
  `IS_SPECIAL` tinyint(1) NULL DEFAULT NULL COMMENT '是否支持异型订单',
  `MER_DEFULT` tinyint(4) NULL DEFAULT NULL COMMENT '默认接单商户=0 否（默认） =1 是',
  `SEND_SMS` tinyint(4) NULL DEFAULT NULL COMMENT '发送短信 =0 不发送（默认） =1 发送',
  `CONTACT` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系方式： QQ，旺旺',
  `RECIEIVE_TIME` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ORDER_SHOP` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商户支持的店铺',
  PRIMARY KEY (`ORG_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '组织接单规则表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_performance
-- ----------------------------
DROP TABLE IF EXISTS `design_performance`;
CREATE TABLE `design_performance`  (
  `PERFORMANCE_ID` bigint(20) NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `IS_GROUP_LEADER` tinyint(4) NOT NULL,
  `AMOUNT_LEVEL_1` bigint(20) NOT NULL,
  `AMOUNT_LEVEL_2` bigint(20) NOT NULL,
  `AMOUNT_LEVEL_3` bigint(20) NOT NULL,
  `AMOUNT_LEVEL_4` bigint(20) NOT NULL,
  `AMOUNT_LEVEL_5` bigint(20) NOT NULL,
  `AMOUNT_LEVEL_6` bigint(20) NOT NULL,
  PRIMARY KEY (`PERFORMANCE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_pinlei
-- ----------------------------
DROP TABLE IF EXISTS `design_pinlei`;
CREATE TABLE `design_pinlei`  (
  `ID` bigint(20) NOT NULL,
  `NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CLASSIFY_ID` bigint(20) NULL DEFAULT NULL,
  `TYPE_ID` bigint(20) NULL DEFAULT NULL,
  `TYPE_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_price
-- ----------------------------
DROP TABLE IF EXISTS `design_price`;
CREATE TABLE `design_price`  (
  `price_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '设计单价ID',
  `convert_id` bigint(20) NOT NULL COMMENT '产品单价id',
  `prd_type_id` bigint(20) NULL DEFAULT NULL COMMENT '产品类型编号',
  `draft_type` int(4) NULL DEFAULT NULL COMMENT '稿件类型',
  `design_price_money` bigint(11) NULL DEFAULT NULL COMMENT '设计单价金额',
  `effect_time` datetime(0) NULL DEFAULT NULL COMMENT '生效时间',
  `status` int(4) NULL DEFAULT NULL COMMENT '设计单价状态（0失效，1生效）',
  PRIMARY KEY (`price_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 512 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计单价表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_size
-- ----------------------------
DROP TABLE IF EXISTS `design_size`;
CREATE TABLE `design_size`  (
  `TYPE_ID` bigint(20) NOT NULL,
  `SIZE_ID` bigint(20) NOT NULL,
  `SIZE_STATUS` int(11) NOT NULL,
  `SIZE_WIDTH` decimal(10, 2) NOT NULL,
  `SIZE_HEIGHT` decimal(10, 2) NOT NULL,
  `SIZE_BLEED` decimal(10, 2) NOT NULL,
  `SIZE_SEQ` int(11) NOT NULL,
  `SIZE_SIDE` decimal(10, 0) NULL DEFAULT NULL COMMENT '侧面长度',
  PRIMARY KEY (`SIZE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for design_type
-- ----------------------------
DROP TABLE IF EXISTS `design_type`;
CREATE TABLE `design_type`  (
  `TYPE_ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `TYPE_NAME` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型名, 例如：名片、彩页、画册',
  `IS_ENABLED` tinyint(4) NOT NULL COMMENT '状态 1=正常、0=停用',
  `MER_DISPATCH_EFFECTIVE_TIME` int(11) NOT NULL COMMENT '分拣时效(分拣时间)，单位分钟',
  `DISPATCH_ORDER_EFFECTIVE_TIME` int(11) NOT NULL COMMENT '派单时效(派单时间)，单位分钟',
  `TYPE_SEQ` int(11) NOT NULL COMMENT '排序功能',
  `EFFECTIVE_TIME` int(11) NOT NULL COMMENT '初稿时效(初稿时间)，单位分钟',
  `EFFECTIVE_END_TIME` int(11) NOT NULL COMMENT '定稿时效(定稿时间)，单位分钟',
  `SIZE_M_WIDTH` decimal(8, 2) NULL DEFAULT NULL,
  `SIZE_M_HEIGHT` decimal(8, 2) NULL DEFAULT NULL,
  `DESIGN_FILE_TYPE` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设计文件类型',
  `PRINTING_FILE_TYPE` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '印刷文件类型',
  `BLEEDING` decimal(8, 2) NULL DEFAULT NULL COMMENT '产品出血',
  `DPI` decimal(8, 2) NULL DEFAULT NULL COMMENT '产品分辨率',
  PRIMARY KEY (`TYPE_ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1916 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计平台产品类型表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for designer_course
-- ----------------------------
DROP TABLE IF EXISTS `designer_course`;
CREATE TABLE `designer_course`  (
  `designer` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计师',
  `work_experience` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工作经历',
  `skill_scope` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '软件能力',
  `design_type` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '擅长设计',
  `work_duration` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工作时长',
  `work_status` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '在职情况',
  `receive_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '收款方式',
  `receive_account` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '收款账号、收款信息',
  `designer_remark` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `previous_end_count` int(11) NULL DEFAULT 0 COMMENT '上月订单数量',
  `previous_performance` bigint(20) NULL DEFAULT 0 COMMENT '上月绩效',
  `last_onlime_time` datetime(0) NULL DEFAULT NULL COMMENT '最后上线时间',
  `add_operator` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '添加人',
  `add_time` datetime(0) NOT NULL COMMENT '添加时间',
  `update_operator` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`designer`) USING BTREE,
  INDEX `IDX_WORK_STATUS`(`work_status`) USING BTREE,
  INDEX `IDX_ADD_TIME`(`add_time`) USING BTREE,
  INDEX `IDX_WORK_DURATION`(`work_duration`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师个人信息扩展表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for designer_group
-- ----------------------------
DROP TABLE IF EXISTS `designer_group`;
CREATE TABLE `designer_group`  (
  `DESIGNER_GROUP_ID` bigint(20) NOT NULL COMMENT '设计师组id',
  `DESIGNER_GROUP_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计师组名称',
  `MAX_ORDER_AMOUNT` bigint(20) NOT NULL COMMENT '最大接单金额',
  `MIN_ORDER_AMOUNT` bigint(20) NULL DEFAULT 0 COMMENT '最小接单金额',
  `IS_HIGH_QUALITY_ORDER` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否优质订单',
  `IS_LARGE_AMOUNT` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否支持大金额订单',
  `IS_URGENT` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否支持加急订单',
  `IS_DESIGN` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否支持只设计不印刷',
  `IS_SPECIAL` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否支持异型订单',
  `AFTER_NAMES` varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MERCHANT_IDS` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联渠道ID',
  `REMARK` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注',
  `STATUS` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:0失效,1失效',
  `MODIFY_OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MODIFY_TIME` datetime(0) NULL DEFAULT NULL,
  `MAX_ORDER_NUM` tinyint(4) NOT NULL DEFAULT 0 COMMENT '最大接单量（老用户除外）',
  `MAX_WAIVE_NUM` tinyint(4) NOT NULL DEFAULT 0 COMMENT '订单可放弃最大次数',
  PRIMARY KEY (`DESIGNER_GROUP_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师接单规则组表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for designer_group_dispatch
-- ----------------------------
DROP TABLE IF EXISTS `designer_group_dispatch`;
CREATE TABLE `designer_group_dispatch`  (
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员',
  `ORG_ID` bigint(20) NULL DEFAULT NULL,
  `DESIGNER_GROUP_ID` bigint(20) NOT NULL COMMENT '设计师组id',
  `MAX_ORDER_AMOUNT` bigint(20) NOT NULL COMMENT '最大接单金额',
  `MIN_ORDER_AMOUNT` bigint(20) NULL DEFAULT 0 COMMENT '最小接单金额',
  `IS_HIGH_QUALITY_ORDER` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否优质订单',
  `IS_LARGE_AMOUNT` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否支持大金额订单',
  `IS_URGENT` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否支持加急订单',
  `IS_DESIGN` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否支持只设计不印刷',
  `IS_SPECIAL` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否支持异型订单',
  `AFTER_NAMES` varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MERCHANT_IDS` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联渠道ID',
  `STATUS` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:0失效,1正常',
  `MODIFY_OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MODIFY_TIME` datetime(0) NULL DEFAULT NULL,
  `MAX_ORDER_NUM` tinyint(4) NULL DEFAULT 0 COMMENT '最大接单量（老用户除外）',
  `WAIVE_NUM` tinyint(4) NOT NULL DEFAULT 0 COMMENT '设计师每月可放弃订单次数',
  `IS_SHOW_QDDT` tinyint(1) NULL DEFAULT NULL COMMENT '是否抢单大厅:0不显示,1显示',
  `IS_SHOW_COST` tinyint(1) NULL DEFAULT NULL COMMENT '是否显示佣金:0不显示,1显示',
  PRIMARY KEY (`OPERATOR_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师接单规则表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for designer_group_dispatch_log
-- ----------------------------
DROP TABLE IF EXISTS `designer_group_dispatch_log`;
CREATE TABLE `designer_group_dispatch_log`  (
  `ORG_ID` bigint(20) NOT NULL,
  `DESIGN_ID` bigint(20) NOT NULL,
  `DES_TIME` datetime(0) NOT NULL,
  `DIS_DESC` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ANALYSIS_TEXT` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '分拣分析结果内容',
  PRIMARY KEY (`DESIGN_ID`, `DES_TIME`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单自动分拣派单日志' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for designer_group_dispatch_value
-- ----------------------------
DROP TABLE IF EXISTS `designer_group_dispatch_value`;
CREATE TABLE `designer_group_dispatch_value`  (
  `DESIGNER_GROUP_DISPATCH_VALUE_ID` bigint(20) NOT NULL COMMENT '主键id',
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员',
  `RELATED_TYPE` int(11) NOT NULL COMMENT '关联类型:0标准/改稿自来稿,1普通设计,2资深设计,3行业',
  `RELATED_VALUE` bigint(20) NOT NULL COMMENT '关联的值',
  PRIMARY KEY (`DESIGNER_GROUP_DISPATCH_VALUE_ID`) USING BTREE,
  INDEX `IND_CODE_TYPE_VALUE`(`OPERATOR_CODE`, `RELATED_TYPE`, `RELATED_VALUE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师接单规则关联属性值表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for designer_group_value
-- ----------------------------
DROP TABLE IF EXISTS `designer_group_value`;
CREATE TABLE `designer_group_value`  (
  `DESIGNER_GROUP_VALUE_ID` bigint(20) NOT NULL COMMENT '主键id',
  `DESIGNER_GROUP_ID` bigint(20) NOT NULL COMMENT '设计师组id',
  `RELATED_TYPE` int(11) NOT NULL COMMENT '关联类型:0标准/改稿自来稿,1普通设计,2资深设计,3行业',
  `RELATED_VALUE` bigint(20) NOT NULL COMMENT '关联的值',
  PRIMARY KEY (`DESIGNER_GROUP_VALUE_ID`) USING BTREE,
  INDEX `IND_GROUP_TYPE_VALUE`(`DESIGNER_GROUP_ID`, `RELATED_TYPE`, `RELATED_VALUE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师接单组关联的属性值表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for designer_order_performance_stat
-- ----------------------------
DROP TABLE IF EXISTS `designer_order_performance_stat`;
CREATE TABLE `designer_order_performance_stat`  (
  `design_id` bigint(20) NOT NULL COMMENT '订单编号',
  `designer` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计师',
  `org_id` bigint(20) NOT NULL COMMENT '组织编号',
  `print_ks` int(11) NULL DEFAULT 0 COMMENT '款数',
  `template_draft_fee` bigint(20) NOT NULL COMMENT '改稿价格（改稿自来稿设计费一律按0.5元*款数计算，不区分产品）',
  `prd_convert_fee` bigint(20) NOT NULL COMMENT '产品单价',
  `multi_ks_fee` bigint(20) NOT NULL COMMENT '多款费用（（款数-1）*0.5）',
  `multi_ms_fee` bigint(20) NOT NULL COMMENT ' 多模费用(订单模数≥3一律加三元)',
  `design_copies` int(8) NOT NULL COMMENT '设计份数',
  `order_designer_fee` bigint(20) NOT NULL COMMENT '订单设计师费用',
  `design_end_time` datetime(0) NOT NULL COMMENT '设计师定稿时间',
  `add_time` datetime(0) NOT NULL COMMENT '添加时间',
  PRIMARY KEY (`design_id`) USING BTREE,
  INDEX `IDX_DESIGN_END_TIME`(`design_end_time`) USING BTREE,
  INDEX `IDX_DESIGNER`(`designer`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师订单绩效表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for designer_profile
-- ----------------------------
DROP TABLE IF EXISTS `designer_profile`;
CREATE TABLE `designer_profile`  (
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员',
  `PERSONAL_PROFILE` varchar(350) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '个人简介',
  `LABELS` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '标签',
  `STATE` tinyint(4) NULL DEFAULT NULL COMMENT '状态: 0未提交 1未审核 2审核退回 3审核通过',
  `ADD_TIME` datetime(0) NULL DEFAULT NULL COMMENT '提交时间',
  PRIMARY KEY (`OPERATOR_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师个人信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for designer_works
-- ----------------------------
DROP TABLE IF EXISTS `designer_works`;
CREATE TABLE `designer_works`  (
  `DESIGNER_WORKS_ID` bigint(20) NOT NULL COMMENT '作品id',
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员',
  `IMG_PATH` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '图片路径',
  `IMG_KEY` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'OSS文件key',
  `STATE` tinyint(4) NULL DEFAULT NULL COMMENT '状态: 0未审核 1审核退回 2审核通过 ',
  `ADD_TIME` datetime(0) NULL DEFAULT NULL COMMENT '提交时间',
  PRIMARY KEY (`DESIGNER_WORKS_ID`) USING BTREE,
  INDEX `IDX_OPERATOR_CODE`(`OPERATOR_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师个人作品' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for dzmp_design_element
-- ----------------------------
DROP TABLE IF EXISTS `dzmp_design_element`;
CREATE TABLE `dzmp_design_element`  (
  `ID` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `MEDIA_ID` bigint(20) NOT NULL COMMENT '模板ID',
  `ELE_JSON` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计元素JSON字符串',
  `MODIFY_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`ID`) USING BTREE,
  INDEX `IDX_MEDIA_ID`(`MEDIA_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '电子名片设计元素表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for dzmp_image_storage
-- ----------------------------
DROP TABLE IF EXISTS `dzmp_image_storage`;
CREATE TABLE `dzmp_image_storage`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `type` tinyint(4) NOT NULL COMMENT '类型:1=个人相册;2=公司相册;',
  `user_card_id` bigint(20) NULL DEFAULT NULL COMMENT '电子名片id',
  `company_id` bigint(20) NULL DEFAULT NULL COMMENT '公司id',
  `img_url` varchar(350) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图片url',
  `sort` int(11) NULL DEFAULT 1000 COMMENT '排序',
  `state` tinyint(4) NOT NULL COMMENT '状态：0=失效；1=生效',
  `add_operator_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '添加人code',
  `add_time` datetime(0) NOT NULL COMMENT '添加时间',
  `update_operator_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改人code',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '电子名片-名片对应的图片临时数据表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for dzmp_user_card_storage
-- ----------------------------
DROP TABLE IF EXISTS `dzmp_user_card_storage`;
CREATE TABLE `dzmp_user_card_storage`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `design_id` bigint(20) NOT NULL COMMENT '设计平台订单ID',
  `media_id` bigint(20) NULL DEFAULT NULL COMMENT '媒体编号',
  `user_id` bigint(20) NULL DEFAULT NULL COMMENT '电子名片用户ID',
  `user_card_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户真名',
  `user_remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '个人介绍',
  `company_alias` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司别名',
  `position` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职位',
  `card_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名片URL',
  `region` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在省份',
  `city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在城市',
  `district` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在区县',
  `address` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
  `latitude` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
  `longitude` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经度',
  `wxcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信号',
  `user_qq` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'QQ',
  `user_email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '电子邮箱',
  `mobile` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号码',
  `landline` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '座机',
  `user_fax` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '传真',
  `website_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网址',
  `card_avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名片头像',
  `card_background` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名片背景头像',
  `card_background_type` tinyint(4) NULL DEFAULT NULL COMMENT '背景图片类型：0=系统；1=自定义',
  `card_layout_id` bigint(20) NULL DEFAULT NULL COMMENT '名片版式id',
  `remark` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  `state` tinyint(4) NOT NULL DEFAULT 1 COMMENT '名片状态：0=失效；1=生效',
  `use_state` tinyint(4) NOT NULL DEFAULT 0 COMMENT '用户是否已使用：0=未使用；1=已使用',
  `add_operator_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '添加人code',
  `add_time` datetime(0) NOT NULL COMMENT '添加时间',
  `update_operator_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改人code',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '电子名片-用户名片的临时数据表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for group_members
-- ----------------------------
DROP TABLE IF EXISTS `group_members`;
CREATE TABLE `group_members`  (
  `START_DATE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `USER_CODE` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `END_DATE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `GROUP_ID` bigint(20) NOT NULL,
  `IS_GROUP_LEADER` int(11) NOT NULL,
  PRIMARY KEY (`START_DATE`, `USER_CODE`) USING BTREE,
  INDEX `IX_START_DATE_END_DATE`(`START_DATE`, `END_DATE`) USING BTREE,
  INDEX `IX_GROUP_ID`(`GROUP_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for material_cat
-- ----------------------------
DROP TABLE IF EXISTS `material_cat`;
CREATE TABLE `material_cat`  (
  `CAT_CODE` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `TYPE_CODE` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CAT_NAME` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CAT_STATUS` tinyint(4) NOT NULL,
  `CAT_LABEL` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CAT_SEQ` int(11) NOT NULL,
  PRIMARY KEY (`CAT_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for material_svg
-- ----------------------------
DROP TABLE IF EXISTS `material_svg`;
CREATE TABLE `material_svg`  (
  `SVG_ID` bigint(20) NOT NULL,
  `SVG_STATUS` tinyint(4) NOT NULL,
  `SVG_CODE` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SVG_SEQ` int(11) NOT NULL,
  `IS_EDIT` tinyint(4) NOT NULL,
  `IS_UPLOAD` tinyint(4) NOT NULL,
  `TYPE_CODE` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CAT_CODE` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SVG_THUMBNAIL` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `KEYWORDS` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`SVG_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for media_bg
-- ----------------------------
DROP TABLE IF EXISTS `media_bg`;
CREATE TABLE `media_bg`  (
  `MEDIA_ID` bigint(20) NOT NULL,
  `BID` int(11) NOT NULL,
  `ODD_EVEN` bigint(11) NULL DEFAULT NULL,
  `FILE_ID` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `SOURCE` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `BG_URL` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `BG_MIN_URL` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`MEDIA_ID`, `BID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for media_canvas
-- ----------------------------
DROP TABLE IF EXISTS `media_canvas`;
CREATE TABLE `media_canvas`  (
  `MEDIA_ID` bigint(20) NOT NULL,
  `MEDIA_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `STATUS` tinyint(4) NOT NULL,
  `MEDIA_TYPE` bigint(20) NULL DEFAULT NULL,
  `IS_EDIT` tinyint(1) NULL DEFAULT NULL,
  `WIDTH` decimal(16, 8) NOT NULL,
  `HEIGHT` decimal(16, 8) NOT NULL,
  `WIDTH_MM` decimal(16, 8) NOT NULL,
  `HEIGHT_MM` decimal(16, 8) NOT NULL,
  `DPI` int(11) NOT NULL,
  `BLEED_SIZE` double(16, 8) NOT NULL,
  `CREATE_MODE` tinyint(4) NOT NULL COMMENT '创建方式，0：mm，1：像素',
  `IS_MODIFY` tinyint(1) NOT NULL,
  `ODD_EVEN` bigint(11) NULL DEFAULT NULL,
  `MEDIA_URL` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `CREATE_TIME` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `UPDATE_TIME` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `EDIT_TIME` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `FULL_WIDTH` decimal(16, 8) NULL DEFAULT NULL,
  `FULL_HEIGHT` decimal(16, 8) NULL DEFAULT NULL,
  `FULL_WIDTH_MM` decimal(16, 8) NULL DEFAULT NULL,
  `FULL_HEIGHT_MM` decimal(16, 8) NULL DEFAULT NULL,
  `BASE_WIDTH_MM` decimal(16, 8) NULL DEFAULT NULL,
  `BASE_HEIGHT_MM` decimal(16, 8) NULL DEFAULT NULL,
  PRIMARY KEY (`MEDIA_ID`) USING BTREE,
  INDEX `IX_MEDIA_CANVAS_CREATE_TIME`(`CREATE_TIME`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for media_cover_material
-- ----------------------------
DROP TABLE IF EXISTS `media_cover_material`;
CREATE TABLE `media_cover_material`  (
  `MEDIA_ID` bigint(20) NOT NULL,
  `BID` int(11) NOT NULL,
  `MID` int(11) NOT NULL,
  `SOURCE` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`MEDIA_ID`, `BID`, `MID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for media_font
-- ----------------------------
DROP TABLE IF EXISTS `media_font`;
CREATE TABLE `media_font`  (
  `FONT_INDEX` int(11) NOT NULL,
  `FONT_NAME` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_NAME` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `FONT_STATUS` tinyint(4) NOT NULL,
  `FONT_SVG` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FONT_PATH` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`FONT_NAME`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for media_image_use
-- ----------------------------
DROP TABLE IF EXISTS `media_image_use`;
CREATE TABLE `media_image_use`  (
  `FILE_ID` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `URL` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `NUM` int(11) NOT NULL,
  `OPERATE_TIME` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`FILE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for media_material
-- ----------------------------
DROP TABLE IF EXISTS `media_material`;
CREATE TABLE `media_material`  (
  `MEDIA_ID` bigint(20) NOT NULL,
  `BID` int(11) NOT NULL,
  `MID` int(11) NOT NULL,
  `POS` int(11) NOT NULL,
  `TYPE` tinyint(4) NOT NULL,
  `STATUS` tinyint(4) NOT NULL,
  `FILE_ID` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `SOURCE` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`MEDIA_ID`, `BID`, `MID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for media_material_param
-- ----------------------------
DROP TABLE IF EXISTS `media_material_param`;
CREATE TABLE `media_material_param`  (
  `MEDIA_ID` bigint(20) NOT NULL,
  `BID` int(11) NOT NULL,
  `MID` int(11) NOT NULL,
  `PARAM_KEY` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_NAME` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_TYPE` tinyint(4) NOT NULL,
  PRIMARY KEY (`MEDIA_ID`, `BID`, `MID`, `PARAM_KEY`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for media_param
-- ----------------------------
DROP TABLE IF EXISTS `media_param`;
CREATE TABLE `media_param`  (
  `PARAM_INDEX` int(11) NOT NULL,
  `PARAM_CAT` bigint(20) NOT NULL,
  `PARAM_TYPE` tinyint(4) NOT NULL,
  `PARAM_KEY` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_NAME` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_VALUE` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `PARAM_DESC` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`PARAM_CAT`, `PARAM_KEY`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for media_temp_image
-- ----------------------------
DROP TABLE IF EXISTS `media_temp_image`;
CREATE TABLE `media_temp_image`  (
  `ID` bigint(20) NOT NULL,
  `MEDIA_ID` bigint(20) NOT NULL,
  `FILE_ID` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `TYPE` tinyint(4) NOT NULL,
  `CREATE_TIME` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`ID`) USING BTREE,
  INDEX `IDX_MEDIA_ID`(`MEDIA_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for media_template
-- ----------------------------
DROP TABLE IF EXISTS `media_template`;
CREATE TABLE `media_template`  (
  `MEDIA_ID` bigint(20) NOT NULL,
  `TEMPLATE_TYPE` int(11) NOT NULL,
  `TEMPLATE_STATUS` int(11) NOT NULL,
  `DESIGNER` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `TYPE_ID` bigint(20) NOT NULL,
  `PAGE_VALUE` int(11) NOT NULL,
  `INDUSTRY_ID` bigint(20) NULL DEFAULT NULL,
  `ATTRIBUTE_ID` bigint(20) NULL DEFAULT NULL,
  `INDUSTRY_SUB_IDS` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `INDUSTRY_SUB_NAME` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `ATTRIBUTE_IDS` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `ATTRIBUTE_NAME` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `TEMPLATE_GROUP` varchar(850) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `SHARE_DEPT` varchar(850) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DESIGN_ID` bigint(20) NULL DEFAULT NULL,
  `THEME_COLOR` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `KEYWORD_ID` bigint(20) NULL DEFAULT NULL,
  `KEYWORD_NAME` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `KEYWORDS` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `TEMPLATE_SRC` bigint(20) NULL DEFAULT NULL,
  `RELEASE_STATUS` tinyint(4) NOT NULL,
  `RELEASE_TIME` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `FILE_TYPE` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板外部稿件后缀格式pdf、cdr、ai,多个分隔符连接',
  `CREATE_CHANNEL` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建方式',
  PRIMARY KEY (`MEDIA_ID`) USING BTREE,
  INDEX `IX_MEDIA_TEMPLATE_TYPE_STATUS`(`TEMPLATE_TYPE`, `TEMPLATE_STATUS`) USING BTREE,
  INDEX `ix_DESIGN_ID`(`DESIGN_ID`) USING BTREE,
  INDEX `ix_DESIGNER`(`DESIGNER`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ord_opr_log
-- ----------------------------
DROP TABLE IF EXISTS `ord_opr_log`;
CREATE TABLE `ord_opr_log`  (
  `LOG_ID` bigint(20) NOT NULL,
  `DESIGN_ID` bigint(20) NOT NULL,
  `STATUS` int(11) NOT NULL,
  `OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `OPERATE_DESC` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  `EVENT_TYPE` int(11) NULL DEFAULT NULL COMMENT '事件类型',
  `DESIGNER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设计师',
  PRIMARY KEY (`LOG_ID`) USING BTREE,
  INDEX `IX_CREATE_TIME_DESIGNER_EVENT_TYPE`(`CREATE_TIME`, `EVENT_TYPE`, `DESIGNER`) USING BTREE,
  INDEX `IDX_CREATE_TIME`(`CREATE_TIME`) USING BTREE,
  INDEX `idenx_designid`(`DESIGN_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ord_progress_note
-- ----------------------------
DROP TABLE IF EXISTS `ord_progress_note`;
CREATE TABLE `ord_progress_note`  (
  `DESIGN_ID` bigint(20) NULL DEFAULT NULL,
  `ORD_PROGRESS_NOTE` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `OPERATE_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CREATE_TIME` datetime(0) NOT NULL,
  INDEX `idx_DESIGN_ID`(`DESIGN_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for order_convert
-- ----------------------------
DROP TABLE IF EXISTS `order_convert`;
CREATE TABLE `order_convert`  (
  `CONVERT_ID` bigint(20) NOT NULL,
  `CONVERT_TYPE` int(11) NOT NULL,
  `CONVERT_NUM` decimal(10, 2) NOT NULL,
  `PRD_TYPE_ID` bigint(20) NOT NULL,
  `PRD_TYPE_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CONVERT_MODULUS` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CONVERT_MODULUS_NUM` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `MODIFY_TIME` datetime(0) NOT NULL,
  PRIMARY KEY (`CONVERT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for order_message
-- ----------------------------
DROP TABLE IF EXISTS `order_message`;
CREATE TABLE `order_message`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `design_id` bigint(20) NOT NULL COMMENT '订单号',
  `buyer_nick` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '旺旺号',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `message_type` int(2) NOT NULL COMMENT '消息类型(订单审核、排产退回，催稿)',
  `topic` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT ' 主题，(催稿大类，orderReminder:订单催稿/定稿,changeDesigner:更换/指定设计师/订单加急)',
  `production_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '生产者code',
  `production_time` datetime(0) NOT NULL COMMENT '生产时间',
  `message_body` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '消息内容',
  `consumer_code_type` int(2) NOT NULL COMMENT '消费者类型(0:操作员 1:协调人)。默认为0',
  `consumer_platform_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '消费平台：ERP,DESIGN,CONSIGNMENT',
  `consumer_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '消费者code',
  `consumer_state` int(1) NOT NULL COMMENT '消费状态,0:未消费，1:已消费',
  `consumer_time` datetime(0) NULL DEFAULT NULL COMMENT '消费时间',
  `remark` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_create_time`(`create_time`) USING BTREE,
  INDEX `idx_production_code`(`production_code`) USING BTREE,
  INDEX `idx_consumer_code`(`consumer_code`) USING BTREE,
  INDEX `idx_buyer_nick`(`buyer_nick`) USING BTREE,
  INDEX `idx_design_id`(`design_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '平台消息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for order_questions
-- ----------------------------
DROP TABLE IF EXISTS `order_questions`;
CREATE TABLE `order_questions`  (
  `QUESTIONS_ID` bigint(20) NOT NULL COMMENT '考试订单id',
  `DESIGN_REQUIREMENTS` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计要求',
  `STATUS` tinyint(4) NOT NULL COMMENT '考试状态：10 未提交 20 等待审核 30 审核通过 40 审核拒绝',
  `DESIGNER` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计师',
  `CREATE_TIME` datetime(0) NOT NULL COMMENT '创建时间',
  `DESIGN_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '设计完成时间',
  `REMARKS` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注说明',
  `MOBILE` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`QUESTIONS_ID`) USING BTREE,
  INDEX `IDX_DESIGNER`(`DESIGNER`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师考试订单表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for order_token
-- ----------------------------
DROP TABLE IF EXISTS `order_token`;
CREATE TABLE `order_token`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `token_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NULL DEFAULT NULL COMMENT 'token名',
  `context` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NULL DEFAULT NULL COMMENT '内容',
  `add_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_unicode_520_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for order_type_stat
-- ----------------------------
DROP TABLE IF EXISTS `order_type_stat`;
CREATE TABLE `order_type_stat`  (
  `DESIGNER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DATE` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `ORDER_SUM` int(11) NOT NULL,
  `MULTIPLE3_5` int(11) NOT NULL,
  `MULTIPLE6_8` int(11) NOT NULL,
  `MULTIPLE9_11` int(11) NOT NULL,
  `MULTIPLE12` int(11) NOT NULL,
  `NORMAL_PROCESSING` int(11) NOT NULL,
  `SPECIAL_PROCESSING` int(11) NOT NULL,
  `APPLY_ORDER` int(11) NOT NULL,
  `AMOUNT100_150` int(11) NOT NULL,
  `AMOUNT150_200` int(11) NOT NULL,
  `AMOUNT200_250` int(11) NOT NULL,
  `AMOUNT250_300` int(11) NOT NULL,
  `AMOUNT300_350` int(11) NOT NULL,
  `AMOUNT350_400` int(11) NOT NULL,
  `AMOUNT400_450` int(11) NOT NULL,
  `AMOUNT450_500` int(11) NOT NULL,
  `AMOUNT500` int(11) NOT NULL,
  PRIMARY KEY (`DESIGNER`, `DATE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单类型统计表 ' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for performance_param
-- ----------------------------
DROP TABLE IF EXISTS `performance_param`;
CREATE TABLE `performance_param`  (
  `VALID_DATE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `PRICE_TYPE` int(11) NOT NULL,
  `PRICE_LEVEL_1` bigint(20) NOT NULL,
  `PRICE_LEVEL_2` bigint(20) NOT NULL,
  `PRICE_LEVEL_3` bigint(20) NOT NULL,
  `PRICE_LEVEL_4` bigint(20) NOT NULL,
  `PRICE_LEVEL_5` bigint(20) NOT NULL,
  `PRICE_LEVEL_6` bigint(20) NOT NULL,
  `LEVEL_1_MAX_COUNT` int(11) NOT NULL,
  `LEVEL_2_MAX_COUNT` int(11) NOT NULL,
  `LEVEL_3_MAX_COUNT` int(11) NOT NULL,
  `LEVEL_4_MAX_COUNT` int(11) NOT NULL,
  `LEVEL_5_MAX_COUNT` int(11) NOT NULL,
  `LEVEL_6_MAX_COUNT` int(11) NOT NULL,
  PRIMARY KEY (`VALID_DATE`, `ORG_ID`, `PRICE_TYPE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for performance_parameter
-- ----------------------------
DROP TABLE IF EXISTS `performance_parameter`;
CREATE TABLE `performance_parameter`  (
  `PARAMETER_ID` bigint(20) NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `ROLE` tinyint(4) NOT NULL,
  `AMOUNT_LEVEL_1` bigint(20) NOT NULL,
  `AMOUNT_LEVEL_2` bigint(20) NOT NULL,
  `AMOUNT_LEVEL_3` bigint(20) NOT NULL,
  `AMOUNT_LEVEL_4` bigint(20) NOT NULL,
  `AMOUNT_LEVEL_5` bigint(20) NOT NULL,
  `AMOUNT_LEVEL_6` bigint(20) NOT NULL,
  PRIMARY KEY (`PARAMETER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for performance_stat
-- ----------------------------
DROP TABLE IF EXISTS `performance_stat`;
CREATE TABLE `performance_stat`  (
  `STAT_ID` bigint(20) NOT NULL,
  `DESIGNER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `IS_GROUP_LEADER` tinyint(4) NOT NULL DEFAULT 0,
  `STAT_DATE` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DESIGN_COMPLETE_SUM` decimal(15, 1) NOT NULL,
  `DESIGN_AMOUNT` bigint(20) NOT NULL,
  `ORDER_TYPE_SUM` int(11) NOT NULL,
  `ORDER_TYPE_AMOUNT` bigint(20) NOT NULL,
  `REFUND_SUM` int(11) NOT NULL,
  `DESIGN_BEGIN_SUM` int(11) NOT NULL,
  `REFUND_RATE` bigint(20) NOT NULL,
  `REFUND_AMOUNT` bigint(20) NOT NULL,
  PRIMARY KEY (`STAT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for performance_statistics
-- ----------------------------
DROP TABLE IF EXISTS `performance_statistics`;
CREATE TABLE `performance_statistics`  (
  `STAT_DATE` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DESIGNER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `IS_GROUP_LEADER` tinyint(4) NOT NULL,
  `DESIGN_COMPLETE_SUM` decimal(15, 1) NOT NULL,
  `DESIGN_AMOUNT` bigint(20) NOT NULL,
  `ORDER_TYPE_SUM` int(11) NOT NULL,
  `ORDER_TYPE_AMOUNT` bigint(20) NOT NULL,
  `REFUND_SUM` int(11) NOT NULL,
  `DESIGN_COUNT` int(11) NOT NULL,
  `REFUND_RATE` bigint(20) NOT NULL,
  `REFUND_AMOUNT` bigint(20) NOT NULL,
  `AFTER_LOSS_AMOUNT` bigint(20) NOT NULL,
  `AFTER_LOSS_AMOUNT_CANCELED` bigint(20) NOT NULL,
  `AFTER_COUNT` int(11) NULL DEFAULT NULL COMMENT '售后单数',
  `QC_SCORE` decimal(10, 0) NULL DEFAULT NULL COMMENT '质检分数',
  `QC_AMOUNT` bigint(20) NULL DEFAULT NULL COMMENT '质检金额',
  PRIMARY KEY (`STAT_DATE`, `DESIGNER`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for product_convert
-- ----------------------------
DROP TABLE IF EXISTS `product_convert`;
CREATE TABLE `product_convert`  (
  `convert_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '产品单价id',
  `prd_type_id` bigint(20) NOT NULL COMMENT '产品类型编号',
  `prd_size_width` int(11) NOT NULL COMMENT '尺寸范围宽度',
  `prd_size_height` int(11) NOT NULL COMMENT '尺寸范围高度',
  `prd_page_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '面数名称',
  `add_operator` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '添加人',
  `add_time` datetime(0) NOT NULL COMMENT '添加时间',
  `update_operator` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `seq` int(11) NOT NULL COMMENT '序号',
  `alias` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品别名',
  PRIMARY KEY (`convert_id`) USING BTREE,
  INDEX `IDX_PRD_TYPE_ID`(`prd_type_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '产品单价表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for product_convert_copy
-- ----------------------------
DROP TABLE IF EXISTS `product_convert_copy`;
CREATE TABLE `product_convert_copy`  (
  `convert_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '产品单价id',
  `prd_type_id` bigint(20) NOT NULL COMMENT '产品类型编号',
  `prd_size_width` int(11) NOT NULL COMMENT '尺寸范围宽度',
  `prd_size_height` int(11) NOT NULL COMMENT '尺寸范围高度',
  `prd_page_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '面数名称',
  `add_operator` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '添加人',
  `add_time` datetime(0) NOT NULL COMMENT '添加时间',
  `update_operator` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `seq` int(11) NOT NULL COMMENT '序号',
  `alias` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品别名',
  PRIMARY KEY (`convert_id`) USING BTREE,
  INDEX `IDX_PRD_TYPE_ID`(`prd_type_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '产品单价表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qc_apply_score
-- ----------------------------
DROP TABLE IF EXISTS `qc_apply_score`;
CREATE TABLE `qc_apply_score`  (
  `APPLY_ID` bigint(20) NOT NULL,
  `DESIGNER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `APPLY_REASON` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `APPLY_IMG_PATH` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `APPLY_TIME` datetime(0) NOT NULL,
  `SCORE` decimal(10, 1) NOT NULL,
  `APPLY_FLAG` int(11) NOT NULL,
  `APPLY_BACK_REASON` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `QC_TYPE_ID` bigint(20) NULL DEFAULT NULL COMMENT '加分类型',
  `QC_AWARDED_AUDITOR` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '审核人',
  `QC_AWARDED_AUDITOR_TIME` datetime(0) NULL DEFAULT NULL COMMENT '审核时间',
  PRIMARY KEY (`APPLY_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '质检加分表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qc_awarded_type
-- ----------------------------
DROP TABLE IF EXISTS `qc_awarded_type`;
CREATE TABLE `qc_awarded_type`  (
  `QC_TYPE_ID` bigint(20) NOT NULL COMMENT '质检加分类型id',
  `QC_AWARDED_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '质检加分类型名称',
  `QC_SCORE` decimal(10, 1) NULL DEFAULT NULL COMMENT '质检加分对应分数',
  PRIMARY KEY (`QC_TYPE_ID`) USING BTREE,
  UNIQUE INDEX `idx_QC_AWARDED_NAME`(`QC_AWARDED_NAME`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '质检加分类型表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qc_parameter
-- ----------------------------
DROP TABLE IF EXISTS `qc_parameter`;
CREATE TABLE `qc_parameter`  (
  `PARAMETER_ID` bigint(20) NOT NULL,
  `FLAG` tinyint(4) NOT NULL,
  `CONTENT` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SCORE` decimal(15, 1) NULL DEFAULT NULL,
  PRIMARY KEY (`PARAMETER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qc_performance_param
-- ----------------------------
DROP TABLE IF EXISTS `qc_performance_param`;
CREATE TABLE `qc_performance_param`  (
  `QC_PERFORMANCE_ID` bigint(20) NOT NULL COMMENT '质检绩效参数编号',
  `STANDARD_QC_SCORE` bigint(20) NOT NULL COMMENT '标准质检分数',
  `REWARD_SCORE` bigint(20) NOT NULL COMMENT '奖励分',
  `PUNISH_SCORE` bigint(20) NOT NULL COMMENT '扣罚分',
  `REWARD_AMOUNT` bigint(20) NOT NULL COMMENT '奖励金额(单位元)',
  `PUNISH_AMOUNT` bigint(20) NOT NULL COMMENT '扣罚金额(单位元)',
  `REWARD_AMOUNT_MAX` bigint(20) NOT NULL COMMENT '最大奖励金额(单位元)',
  `PUNISH_AMOUNT_MAX` bigint(20) NOT NULL COMMENT '最大扣罚金额(单位元)',
  PRIMARY KEY (`QC_PERFORMANCE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '质检绩效参数' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qc_record
-- ----------------------------
DROP TABLE IF EXISTS `qc_record`;
CREATE TABLE `qc_record`  (
  `DESIGN_ID` bigint(20) NOT NULL,
  `ORG_ID` bigint(20) NOT NULL,
  `DESIGNER` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `REASON` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DESCRIPTION` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `SCORE` decimal(15, 1) NULL DEFAULT NULL,
  `IMG_PATH` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `QC_TIME` datetime(0) NOT NULL,
  `QC_FLAG` int(11) NOT NULL,
  PRIMARY KEY (`DESIGN_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for questions_atta
-- ----------------------------
DROP TABLE IF EXISTS `questions_atta`;
CREATE TABLE `questions_atta`  (
  `ATTA_ID` bigint(20) NOT NULL,
  `QUESTIONS_ID` bigint(20) NOT NULL COMMENT '考试订单id',
  `ATTA_MODUL` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '附件标示：CustomFile 客户素材，DesginFile 设计文件，EndFile 印刷文件，ExamVoucher 考试凭证',
  `FILE_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件名称',
  `FILE_TYPE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件格式',
  `SAVE_PATH` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保存路径',
  `FILE_URL` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '访问链接',
  `FILE_SIZE` bigint(20) NOT NULL COMMENT '大小',
  `OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '上传人',
  `UPLOAD_TIME` datetime(0) NOT NULL COMMENT '上传时间',
  `FILEID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`ATTA_ID`) USING BTREE,
  INDEX `IDX_QUESTIONS_ID`(`QUESTIONS_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '考试订单附件表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for refund_parameter
-- ----------------------------
DROP TABLE IF EXISTS `refund_parameter`;
CREATE TABLE `refund_parameter`  (
  `REFUND_PARAMETER_ID` bigint(20) NOT NULL,
  `STANDARD_REFUND_RATE_FLOOR` bigint(20) NOT NULL,
  `STANDARD_REFUND_RATE` bigint(20) NOT NULL,
  `STANDARD_REFUND_RATE_CEIL` bigint(20) NOT NULL,
  `REWARD_DOT` bigint(20) NOT NULL,
  `PUNISH_DOT` bigint(20) NOT NULL,
  `REWARD_AMOUNT` bigint(20) NOT NULL,
  `PUNISH_AMOUNT` bigint(20) NOT NULL,
  `REWARD_AMOUNT_MAX` bigint(20) NOT NULL,
  `PUNISH_AMOUNT_MAX` bigint(20) NOT NULL,
  PRIMARY KEY (`REFUND_PARAMETER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for retention_details
-- ----------------------------
DROP TABLE IF EXISTS `retention_details`;
CREATE TABLE `retention_details`  (
  `DESIGN_ID` bigint(20) NOT NULL COMMENT '订单id',
  `IS_RETENT_DEAL` int(11) NULL DEFAULT NULL COMMENT '设计师是否处理过滞留单,0否、1处理过',
  `RETENT_DEAL_TIME` datetime(0) NULL DEFAULT NULL COMMENT '滞留单自行处理时间',
  `RETENT_DEAL_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '滞留单处理人',
  `RETENT_DEAL_WAY` int(11) NULL DEFAULT NULL COMMENT '滞留单处理方式0:寄存、1:退款',
  `RETENT_FOLLOW_FLAG` int(11) NULL DEFAULT NULL COMMENT '设计师跟进情况:0:较好、1:一般、2:差',
  `RETENT_REMARK` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '滞留单处理备注',
  `RETENTION_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '滞留单处理时间',
  PRIMARY KEY (`DESIGN_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '滞留单详情表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for score_designer_lever
-- ----------------------------
DROP TABLE IF EXISTS `score_designer_lever`;
CREATE TABLE `score_designer_lever`  (
  `designer_lever_id` bigint(20) NOT NULL COMMENT '设计师等级id',
  `designer_lever` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计师等级名称',
  `min_score` int(11) NOT NULL COMMENT '分数下限',
  `max_score` int(11) NOT NULL COMMENT '分数上限',
  `state` tinyint(4) NOT NULL COMMENT '状态：0=失效；1=生效；',
  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `LAST_OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后操作人',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `modify_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`designer_lever_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师积分等级配置' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for score_designer_month_record
-- ----------------------------
DROP TABLE IF EXISTS `score_designer_month_record`;
CREATE TABLE `score_designer_month_record`  (
  `record_id` bigint(20) NOT NULL COMMENT '记录id',
  `operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计师',
  `org_id` bigint(20) NULL DEFAULT NULL COMMENT '设计师所在组织id',
  `duty_time` int(11) NOT NULL COMMENT '月份（比如201812）',
  `designer_lever_id` bigint(20) NULL DEFAULT NULL COMMENT '当时设计师等级id',
  `designer_lever` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当时设计师等级',
  `busi_sum` int(11) NULL DEFAULT NULL COMMENT '业务量（定稿总数量）',
  `after_order_sum` int(11) NULL DEFAULT NULL COMMENT '售后总数量',
  `refund_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '退款率',
  `after_order_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '退款金额占比',
  `qc_score` int(11) NULL DEFAULT NULL COMMENT '质检分',
  `out_time_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '超时占比',
  `finish_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '预约达成率',
  `template_sum` int(11) NULL DEFAULT NULL COMMENT '附件分(上传模板数量)',
  `score` decimal(10, 2) NULL DEFAULT NULL COMMENT '得分',
  `state` tinyint(4) NOT NULL COMMENT '状态：0=失效；1=生效；',
  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `modify_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`record_id`) USING BTREE,
  INDEX `OPERATOR_CODE_INDEX`(`operator_code`) USING BTREE,
  INDEX `DUTY_TIME_INDEX`(`duty_time`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '评分-设计师当月评分记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for score_designer_record
-- ----------------------------
DROP TABLE IF EXISTS `score_designer_record`;
CREATE TABLE `score_designer_record`  (
  `record_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '记录id',
  `operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计师',
  `org_id` bigint(20) NULL DEFAULT NULL COMMENT '设计师所在组织id',
  `state` tinyint(4) NOT NULL COMMENT '状态：0=失效；1=生效；',
  `score` int(11) NULL DEFAULT NULL COMMENT '得分',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `last_modify_time` datetime(0) NULL DEFAULT NULL COMMENT '最后更新时间',
  `last_modify_score` int(11) NULL DEFAULT NULL COMMENT '最后更新积分',
  `last_score_type` bigint(20) NULL DEFAULT NULL COMMENT '最后更新积分细则',
  `order_id` bigint(20) NULL DEFAULT NULL COMMENT '涉及设计单',
  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`record_id`) USING BTREE,
  INDEX `INDEX_STATE`(`state`) USING BTREE,
  INDEX `OPERATOR_CODE_INDEX`(`operator_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师虚拟积分账户' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for score_designer_record_detail
-- ----------------------------
DROP TABLE IF EXISTS `score_designer_record_detail`;
CREATE TABLE `score_designer_record_detail`  (
  `record_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '记录id',
  `operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计师',
  `state` tinyint(4) NOT NULL COMMENT '状态：0=失效；1=生效；',
  `score_type` bigint(20) NULL DEFAULT NULL COMMENT '积分细则ID',
  `score` int(11) NULL DEFAULT NULL COMMENT '得分',
  `order_id` bigint(20) NULL DEFAULT NULL COMMENT '涉及设计单',
  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `create_operator` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设计师',
  `modify_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`record_id`) USING BTREE,
  INDEX `OPERATOR_CODE_INDEX`(`operator_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设计师积分账户交易详情' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for score_type
-- ----------------------------
DROP TABLE IF EXISTS `score_type`;
CREATE TABLE `score_type`  (
  `type_id` bigint(20) NOT NULL COMMENT '类型id',
  `type_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '细则名称',
  `value` int(11) NOT NULL COMMENT '积分值',
  `state` tinyint(4) NOT NULL COMMENT '状态：0=失效；1=生效；',
  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `LAST_OPERATOR_CODE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后操作人',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `modify_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`type_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '评分细则' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for self_order
-- ----------------------------
DROP TABLE IF EXISTS `self_order`;
CREATE TABLE `self_order`  (
  `DESIGN_ID` bigint(20) NOT NULL COMMENT '设计订单编号',
  `LABEL_IDS` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签ID',
  `CONSUMER_TYPE` int(11) NULL DEFAULT 0 COMMENT '客户类型',
  `DEFAULT_LABEL` tinyint(1) NULL DEFAULT 1 COMMENT '是否默认原订单行业标签',
  `KF_DRAFT_STANDARD` tinyint(1) NULL DEFAULT 0 COMMENT '是否为客服负责的标准自来稿订单[0-否，1-是]',
  `CUSTOMER_QRCODE_URL` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '群服务二维码',
  `DESIGNER_REFUND_REASON` bigint(20) NULL DEFAULT NULL COMMENT '退款原因',
  `DRAFT_CHECKER` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '初稿审核人',
  `DRAFT_BACK_REASON` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '初稿审核退回原因',
  `DRAFT_BACK_REASON_PIC_URL` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '初稿审核退回原因截图',
  `DRAFT_BACK_TIME` datetime(0) NULL DEFAULT NULL COMMENT '初稿审核退回时间',
  `END_CHECKER` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定稿审核人',
  `END_BACK_REASON` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定稿审核退回原因',
  `END_BACK_REASON_PIC_URL` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定稿审核退回原因截图',
  `END_BACK_TIME` datetime(0) NULL DEFAULT NULL COMMENT '定稿审核退回时间',
  `URGENT_PRICE` bigint(11) NULL DEFAULT 0 COMMENT '加急费',
  `DESIGN_COST` bigint(11) NULL DEFAULT 0 COMMENT '业务端设计费用',
  PRIMARY KEY (`DESIGN_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单扩展表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sms_log
-- ----------------------------
DROP TABLE IF EXISTS `sms_log`;
CREATE TABLE `sms_log`  (
  `LOG_ID` bigint(20) NOT NULL,
  `MOBILE` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CONTENT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SEND_TIME` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SEND_STATUS` int(11) NOT NULL,
  `DESIGN_ID` bigint(20) NULL DEFAULT NULL,
  `RET_STATUS` int(11) NULL DEFAULT NULL,
  `RET_DESC` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`LOG_ID`) USING BTREE,
  INDEX `idx_DESIGN_ID`(`DESIGN_ID`) USING BTREE,
  INDEX `idx_MOBILE`(`MOBILE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for special_order_type
-- ----------------------------
DROP TABLE IF EXISTS `special_order_type`;
CREATE TABLE `special_order_type`  (
  `SPECIAL_TYPE_ID` bigint(20) NOT NULL,
  `SPECIAL_ORDER_DESCRIBE` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SPECIAL_ORDER_TYPE` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SPECIAL_ORDER_AMOUNT` bigint(20) NOT NULL,
  PRIMARY KEY (`SPECIAL_TYPE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for subscribe_designer_quota_record
-- ----------------------------
DROP TABLE IF EXISTS `subscribe_designer_quota_record`;
CREATE TABLE `subscribe_designer_quota_record`  (
  `record_id` bigint(20) NOT NULL COMMENT '预约记录id',
  `operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设计师',
  `designer_lever_id` bigint(20) NULL DEFAULT NULL COMMENT '当时设计师等级id',
  `designer_lever` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当时设计师等级',
  `min_quota` int(11) NULL DEFAULT NULL COMMENT '当时预约额度下限（作废）',
  `max_quota` int(11) NULL DEFAULT NULL COMMENT '当时预约额度上限（仅用于记录）',
  `max_drafted` int(11) NULL DEFAULT NULL COMMENT '当时未定稿额度上限（作废）',
  `org_id` bigint(20) NOT NULL COMMENT '所属组织id',
  `duty_time` int(11) NOT NULL COMMENT '预约日期（格式20190101）',
  `duty_id` bigint(20) NULL DEFAULT NULL COMMENT '预约班次',
  `duty_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预约班次名称',
  `subscribe_state` tinyint(4) NOT NULL COMMENT '预约状态：1=未预约；2=已预约',
  `subscribe_num` int(11) NULL DEFAULT NULL COMMENT '预约数量',
  `finished_num` int(11) NULL DEFAULT NULL COMMENT '完成数量',
  `finished_old_order_num` int(11) NULL DEFAULT NULL COMMENT '完成的老订单数量',
  `state` tinyint(4) NOT NULL COMMENT '状态：0=失效；1=生效；',
  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `modify_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`record_id`) USING BTREE,
  INDEX `ORG_ID_INDEX`(`org_id`) USING BTREE,
  INDEX `OPERATOR_CODE_INDEX`(`operator_code`) USING BTREE,
  INDEX `DUTY_TIME_INDEX`(`duty_time`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '预约-设计师预约记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for subscribe_org_temp_quota
-- ----------------------------
DROP TABLE IF EXISTS `subscribe_org_temp_quota`;
CREATE TABLE `subscribe_org_temp_quota`  (
  `org_id` bigint(20) NOT NULL COMMENT '组织id',
  `temp_quota` int(11) NOT NULL COMMENT '临时额度',
  `safe_line` int(11) NOT NULL COMMENT '安全线(当前未分配订单数超安全线设置时自动使用临时额度)',
  `state` tinyint(4) NOT NULL COMMENT '状态：0=失效；1=生效；',
  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `modify_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`org_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '预约-组织临时额度配置' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_field
-- ----------------------------
DROP TABLE IF EXISTS `sys_field`;
CREATE TABLE `sys_field`  (
  `FIELD_CAT` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FIELD_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FIELD_GROUP` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `FIELD_STATUS` tinyint(4) NOT NULL,
  `FIELD_SEQ` int(11) NOT NULL,
  PRIMARY KEY (`FIELD_CAT`, `FIELD_NAME`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for timeliness_parameter
-- ----------------------------
DROP TABLE IF EXISTS `timeliness_parameter`;
CREATE TABLE `timeliness_parameter`  (
  `TIMELINESS_PARAMETER_ID` bigint(20) NOT NULL COMMENT '时效参数编号',
  `PRD_TYPE_ID` bigint(20) NOT NULL COMMENT '产品类型id',
  `REWARD_AMOUNT` bigint(20) NOT NULL COMMENT '奖励金额',
  PRIMARY KEY (`TIMELINESS_PARAMETER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '时效参数表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for upll_chunk
-- ----------------------------
DROP TABLE IF EXISTS `upll_chunk`;
CREATE TABLE `upll_chunk`  (
  `FILE_MD5` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CHUNK_SIZE` int(11) NOT NULL,
  `CHUNK_NUM` int(11) NOT NULL,
  `CHUNK_NO` int(11) NOT NULL,
  `CHUNK_TIME` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_NAME` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_EXT` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_PATH` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_ROOT_DIR` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `FILE_UPLOAD_PATH` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`FILE_MD5`, `CHUNK_SIZE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for upll_file
-- ----------------------------
DROP TABLE IF EXISTS `upll_file`;
CREATE TABLE `upll_file`  (
  `FILE_ID` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_MD5` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `FILE_NAME` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_EXT` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_LENGTH` int(11) NOT NULL,
  `FILE_PATH` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_URL` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FILE_TIME` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CONTENT_TYPE` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CONTENT_ENCODING` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CACHE_CONTROL` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `FILE_ROOT_DIR` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `FILE_UPLOAD_PATH` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`FILE_ID`) USING BTREE,
  INDEX `IX_UPLL_FILE_NAME`(`FILE_NAME`(255)) USING BTREE,
  INDEX `IX_UPLL_FILE_MD5`(`FILE_MD5`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for user_material
-- ----------------------------
DROP TABLE IF EXISTS `user_material`;
CREATE TABLE `user_material`  (
  `SVG_ID` bigint(20) NOT NULL,
  `TYPE_CODE` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CAT_CODE` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SVG_SEQ` int(11) NOT NULL,
  `DESIGNER` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `SVG_CODE` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `KEYWORDS` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`SVG_ID`) USING BTREE,
  INDEX `IDX_DESIGNER`(`DESIGNER`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for virtual_account
-- ----------------------------
DROP TABLE IF EXISTS `virtual_account`;
CREATE TABLE `virtual_account`  (
  `operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员名称',
  `operator_status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '操作员状态  1,启用 2,停用 (默认为1)',
  `usable_money` bigint(16) NOT NULL DEFAULT 0 COMMENT '账户可用余额',
  `freeze_money` bigint(16) NOT NULL DEFAULT 0 COMMENT '账户冻结金额',
  `sum_money` bigint(20) NOT NULL DEFAULT 0 COMMENT '总金额 (可用余额+冻结余额)',
  `remark` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`operator_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '虚拟账户表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for virtual_account_20210809
-- ----------------------------
DROP TABLE IF EXISTS `virtual_account_20210809`;
CREATE TABLE `virtual_account_20210809`  (
  `operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员名称',
  `operator_status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '操作员状态  1,启用 2,停用 (默认为1)',
  `usable_money` bigint(16) NOT NULL DEFAULT 0 COMMENT '账户可用余额',
  `freeze_money` bigint(16) NOT NULL DEFAULT 0 COMMENT '账户冻结金额',
  `sum_money` bigint(20) NOT NULL DEFAULT 0 COMMENT '总金额 (可用余额+冻结余额)',
  `remark` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`operator_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '虚拟账户表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for virtual_account_details
-- ----------------------------
DROP TABLE IF EXISTS `virtual_account_details`;
CREATE TABLE `virtual_account_details`  (
  `account_blotter` bigint(16) NOT NULL COMMENT '账户流水',
  `operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员名称',
  `transaction_blotter` bigint(20) NOT NULL COMMENT '交易流水',
  `transaction_status` tinyint(4) NOT NULL COMMENT '交易类型 0,订单量奖励 1,加急单奖励 2,时效奖励 3,老客户奖励  4,完成订单奖励  5,售后处理 6,订单退回',
  `usable_money_add` bigint(8) NOT NULL DEFAULT 0 COMMENT '可用余额增加余额',
  `usable_money_down` bigint(8) NOT NULL DEFAULT 0 COMMENT '可用余额减少余额',
  `freeze_money_add` bigint(8) NOT NULL DEFAULT 0 COMMENT '冻结余额增加余额',
  `freeze_money_down` bigint(8) NOT NULL DEFAULT 0 COMMENT '冻结余额减少余额',
  `operator_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '操作时间',
  `usable_money` bigint(16) NOT NULL DEFAULT 0 COMMENT '账户可用余额',
  `freeze_money` bigint(16) NOT NULL DEFAULT 0 COMMENT '账户冻结金额',
  `sum_money` bigint(20) NOT NULL DEFAULT 0 COMMENT '总金额 (可用余额+冻结余额)',
  `operator_remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作备注',
  PRIMARY KEY (`account_blotter`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '虚拟账户明细表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for virtual_account_type
-- ----------------------------
DROP TABLE IF EXISTS `virtual_account_type`;
CREATE TABLE `virtual_account_type`  (
  `type_id` int(8) NOT NULL COMMENT '交易类型',
  `type_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '交易类型名',
  `last_operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '最后操作员',
  `create_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '创建时间',
  `modify_time` datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  PRIMARY KEY (`type_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '虚拟账户类型表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for virtual_transaction_details
-- ----------------------------
DROP TABLE IF EXISTS `virtual_transaction_details`;
CREATE TABLE `virtual_transaction_details`  (
  `operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员',
  `transaction_blotter` bigint(20) NOT NULL COMMENT '交易流水',
  `design_id` bigint(16) NULL DEFAULT NULL COMMENT '订单号',
  `ORDER_TEXT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品类型',
  `END_TIME` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '设计师定稿时间',
  `transaction_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '交易时间',
  `transaction_status` tinyint(4) NOT NULL COMMENT '交易类型 0,订单量奖励 1,加急单奖励 2,时效奖励 3,老客户奖励  4,完成订单奖励  5,售后处理 6,订单退回',
  `order_money` bigint(8) NULL DEFAULT NULL COMMENT '订单金额',
  PRIMARY KEY (`transaction_blotter`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '虚拟交易明细表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for virtual_transaction_details_20210809
-- ----------------------------
DROP TABLE IF EXISTS `virtual_transaction_details_20210809`;
CREATE TABLE `virtual_transaction_details_20210809`  (
  `operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员',
  `transaction_blotter` bigint(20) NOT NULL COMMENT '交易流水',
  `design_id` bigint(16) NULL DEFAULT NULL COMMENT '订单号',
  `ORDER_TEXT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品类型',
  `END_TIME` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '设计师定稿时间',
  `transaction_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '交易时间',
  `transaction_status` tinyint(4) NOT NULL COMMENT '交易类型 0,订单量奖励 1,加急单奖励 2,时效奖励 3,老客户奖励  4,完成订单奖励  5,售后处理 6,订单退回',
  `order_money` bigint(8) NULL DEFAULT NULL COMMENT '订单金额',
  PRIMARY KEY (`transaction_blotter`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '虚拟交易明细表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for virtual_transaction_details_20221205
-- ----------------------------
DROP TABLE IF EXISTS `virtual_transaction_details_20221205`;
CREATE TABLE `virtual_transaction_details_20221205`  (
  `operator_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员',
  `transaction_blotter` bigint(20) NOT NULL COMMENT '交易流水',
  `design_id` bigint(16) NULL DEFAULT NULL COMMENT '订单号',
  `ORDER_TEXT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品类型',
  `END_TIME` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '设计师定稿时间',
  `transaction_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '交易时间',
  `transaction_status` tinyint(4) NOT NULL COMMENT '交易类型 0,订单量奖励 1,加急单奖励 2,时效奖励 3,老客户奖励  4,完成订单奖励  5,售后处理 6,订单退回',
  `order_money` bigint(8) NULL DEFAULT NULL COMMENT '订单金额',
  PRIMARY KEY (`transaction_blotter`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '虚拟交易明细表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for yq_article
-- ----------------------------
DROP TABLE IF EXISTS `yq_article`;
CREATE TABLE `yq_article`  (
  `CATEGORY_ID` bigint(20) NOT NULL,
  `ARTICLE_ID` bigint(20) NOT NULL,
  `ARTICLE_NUMBER` int(11) NOT NULL,
  `ARTICLE_TITLE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ARTICLE_STATUS` tinyint(4) NOT NULL,
  `ARTICLE_TIME` datetime(0) NOT NULL,
  `ARTICLE_CONTENT` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`ARTICLE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for yq_category
-- ----------------------------
DROP TABLE IF EXISTS `yq_category`;
CREATE TABLE `yq_category`  (
  `PARENT_ID` bigint(20) NOT NULL,
  `CATEGORY_ID` bigint(20) NOT NULL,
  `CATEGORY_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CATEGORY_LEVEL` int(11) NOT NULL,
  `CATEGORY_STATUS` tinyint(4) NOT NULL,
  `CATEGORY_SEQ` int(11) NOT NULL,
  PRIMARY KEY (`CATEGORY_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_avatar
-- ----------------------------
DROP TABLE IF EXISTS `zmr_avatar`;
CREATE TABLE `zmr_avatar`  (
  `AVATAR_ID` bigint(20) NOT NULL,
  `AVATAR_TYPE` tinyint(4) NOT NULL,
  `AVATAR_TIME` bigint(20) NOT NULL,
  `AVATAR_50` mediumblob NOT NULL,
  `AVATAR_100` mediumblob NOT NULL,
  `AVATAR_150` mediumblob NOT NULL,
  PRIMARY KEY (`AVATAR_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_dept
-- ----------------------------
DROP TABLE IF EXISTS `zmr_dept`;
CREATE TABLE `zmr_dept`  (
  `PARENT_ID` bigint(20) NOT NULL,
  `DEPT_ID` bigint(20) NOT NULL,
  `DEPT_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DEPT_LEVEL` int(11) NOT NULL,
  `DEPT_STATUS` tinyint(4) NOT NULL,
  `DEPT_SEQ` int(11) NOT NULL,
  `DEPT_PARENT_ALL` varchar(850) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DEPT_MANAGER` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DEPT_SUB_MANAGER` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `DEPT_DESC` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ORG_ID` bigint(20) NULL DEFAULT NULL COMMENT '组织编号',
  PRIMARY KEY (`DEPT_ID`) USING BTREE,
  INDEX `IX_PARENT_ID`(`PARENT_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_dept_rule
-- ----------------------------
DROP TABLE IF EXISTS `zmr_dept_rule`;
CREATE TABLE `zmr_dept_rule`  (
  `DEPT_ID` bigint(20) NOT NULL,
  `MENU_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`DEPT_ID`, `MENU_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_menu
-- ----------------------------
DROP TABLE IF EXISTS `zmr_menu`;
CREATE TABLE `zmr_menu`  (
  `PARENT_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `MENU_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `MENU_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `MENU_NAME_ABBR` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MENU_LEVEL` tinyint(4) NOT NULL,
  `MENU_TYPE` tinyint(4) NOT NULL,
  `MENU_STATUS` tinyint(4) NOT NULL,
  `MENU_ICON` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MENU_URL` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MENU_DESC` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`MENU_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_operator
-- ----------------------------
DROP TABLE IF EXISTS `zmr_operator`;
CREATE TABLE `zmr_operator`  (
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `OPERATOR_PASS` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `OPERATOR_PASS_SALT` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `OPERATOR_STATUS` tinyint(4) NOT NULL,
  `OPERATOR_TYPE` tinyint(4) NOT NULL,
  `OPERATOR_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_BALANCE` bigint(20) NOT NULL DEFAULT 0,
  `OPERATOR_AVATAR` bigint(20) NULL DEFAULT NULL,
  `OPERATOR_DEPT` varchar(850) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_DEPT_ALL` varchar(1700) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_ROLE` varchar(850) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_MOBILE` varchar(21) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_EMAIL` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_WXCODE` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '个人微信',
  `OPERATOR_SKIN` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_IP` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_URL` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_PARAM` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATOR_CREATED` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `OPERATOR_MODIFIED` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORG_ID` bigint(20) NULL DEFAULT NULL COMMENT '组织编号',
  `OPERATOR_WANGWANG` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPEN_ID` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `INITIAL_PASSWORD` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '初始密码',
  `WKWECHAT_ACCOUNT` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '企业微信code',
  PRIMARY KEY (`OPERATOR_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '操作员账号表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_operator_log
-- ----------------------------
DROP TABLE IF EXISTS `zmr_operator_log`;
CREATE TABLE `zmr_operator_log`  (
  `ORG_ID` bigint(20) NOT NULL,
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `OPERATE_TIME` datetime(0) NOT NULL,
  `OPERATE_URL` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATE_DESC` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATE_IP` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `OPERATE_FEATURE` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  INDEX `IX_ZMR_OPERATOR_LOG_ORG_TIME`(`ORG_ID`, `OPERATE_TIME`) USING BTREE,
  INDEX `IDX_OPERATOR_CODE`(`OPERATOR_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_operator_param
-- ----------------------------
DROP TABLE IF EXISTS `zmr_operator_param`;
CREATE TABLE `zmr_operator_param`  (
  `PARAM_KEY` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_DESC` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`PARAM_KEY`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_operator_rule
-- ----------------------------
DROP TABLE IF EXISTS `zmr_operator_rule`;
CREATE TABLE `zmr_operator_rule`  (
  `OPERATOR_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `MENU_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`OPERATOR_CODE`, `MENU_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_org
-- ----------------------------
DROP TABLE IF EXISTS `zmr_org`;
CREATE TABLE `zmr_org`  (
  `ORG_ID` bigint(20) NOT NULL,
  `ORG_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ORG_LEVEL` int(11) NOT NULL,
  `ORG_STATUS` tinyint(4) NOT NULL,
  `ORG_MANAGER` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ORG_SEQ` int(11) NOT NULL,
  `ORG_DESC` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `NEED_COORDINATER` tinyint(4) NULL DEFAULT NULL COMMENT '是否需要协调（0表示不需要，1表示需要）',
  `ORG_MANAGER_ARR` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人集合',
  PRIMARY KEY (`ORG_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_org_rule
-- ----------------------------
DROP TABLE IF EXISTS `zmr_org_rule`;
CREATE TABLE `zmr_org_rule`  (
  `ORG_ID` bigint(20) NOT NULL,
  `MENU_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`ORG_ID`, `MENU_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_param
-- ----------------------------
DROP TABLE IF EXISTS `zmr_param`;
CREATE TABLE `zmr_param`  (
  `PARAM_GROUP` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_KEY` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_SEQ` int(11) NOT NULL,
  `PARAM_VALUE` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `PARAM_TYPE` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_VALIDATE` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `PARAM_DESC` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`PARAM_GROUP`, `PARAM_KEY`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_param_operator
-- ----------------------------
DROP TABLE IF EXISTS `zmr_param_operator`;
CREATE TABLE `zmr_param_operator`  (
  `PARAM_KEY` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `PARAM_DESC` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`PARAM_KEY`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_role
-- ----------------------------
DROP TABLE IF EXISTS `zmr_role`;
CREATE TABLE `zmr_role`  (
  `ROLE_ID` bigint(20) NOT NULL,
  `ROLE_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ROLE_STATUS` tinyint(4) NOT NULL,
  `ROLE_SEQ` int(11) NOT NULL,
  `ORG_ID` bigint(20) NULL DEFAULT NULL COMMENT '组织编号',
  PRIMARY KEY (`ROLE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for zmr_role_rule
-- ----------------------------
DROP TABLE IF EXISTS `zmr_role_rule`;
CREATE TABLE `zmr_role_rule`  (
  `ROLE_ID` bigint(20) NOT NULL,
  `MENU_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`ROLE_ID`, `MENU_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
