-- 新加的两张表配置

CREATE TABLE `custody_fund_temp_fare_info` (
                                               `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                               `fund_code` varchar(50) DEFAULT NULL,
                                               `inner_fund_code` varchar(50) DEFAULT NULL,
                                               `fund_name` varchar(200) DEFAULT NULL,
                                               `confirm_date` varchar(8) NOT NULL COMMENT '交易确认日期固定格式yyyyMMdd',
                                               `fare_vat` decimal(20,2) DEFAULT NULL COMMENT '应付税费_应付增值税',
                                               `fare_surtax` decimal(20,2) DEFAULT NULL COMMENT '应付税费_应付附加税',
                                               `fare_management` decimal(20,2) DEFAULT NULL COMMENT '应付管理费',
                                               `fare_hosting` decimal(20,2) DEFAULT NULL COMMENT '应付托管费',
                                               `fare_business` decimal(20,2) DEFAULT NULL COMMENT '应付管理人报酬',
                                               `fare_operation_service` decimal(20,2) DEFAULT NULL COMMENT '应付运营服务费',
                                               `fare_vat_temp` varchar(20) DEFAULT NULL COMMENT '应付税费_应付增值税_暂估',
                                               `fare_surtax_temp` decimal(20,2) DEFAULT NULL COMMENT '应付税费_应付附加税_暂估',
                                               `trust_no` varchar(2) CHARACTER SET utf8 NOT NULL COMMENT '数据字典：托管人',
                                               `admin` varchar(8) CHARACTER SET utf8 NOT NULL COMMENT '租户名',
                                               `unique_key` varchar(255) DEFAULT NULL COMMENT '唯一索引：用于插入',
                                               `version` varchar(36) CHARACTER SET utf8 DEFAULT NULL COMMENT '版本',
                                               `remark` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '备注',
                                               `create_time` datetime DEFAULT NULL COMMENT '创建时间',
                                               `update_time` datetime DEFAULT NULL COMMENT '更新时间',
                                               `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                               PRIMARY KEY (`id`),
                                               UNIQUE KEY `unique_key` (`unique_key`) USING BTREE,
                                               KEY `query_key` (`admin`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='基金估值表费用信息表';


CREATE TABLE `custody_cust_share_detail_info` (
                                                  `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                  `seq_no` varchar(32) NOT NULL COMMENT '流水号唯一标识',
                                                  `cserial_no` varchar(32) DEFAULT NULL COMMENT 'TA确认单编号',
                                                  `fund_code` varchar(50) DEFAULT NULL COMMENT '基金备案编码',
                                                  `inner_fund_code` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '基金内部代码',
                                                  `fund_name` varchar(200) DEFAULT NULL COMMENT '基金名称',
                                                  `agency_no` varchar(9) DEFAULT NULL COMMENT '销售商编码',
                                                  `agency_name` varchar(200) DEFAULT NULL COMMENT '销售商名称',
                                                  `branch_code` varchar(9) DEFAULT NULL COMMENT '销售网点代码',
                                                  `branch_name` varchar(200) DEFAULT NULL COMMENT '销售网点名称',
                                                  `fund_acco` varchar(64) DEFAULT NULL COMMENT '基金账号',
                                                  `acct_status` varchar(1) DEFAULT '1' COMMENT '基金账号状态',
                                                  `trade_acco` varchar(24) DEFAULT NULL COMMENT '交易账号',
                                                  `confirm_date` varchar(8) DEFAULT NULL COMMENT '交易确认日期',
                                                  `regist_date` varchar(8) DEFAULT NULL COMMENT '交易确认日期',
                                                  `source_type` varchar(2) DEFAULT NULL COMMENT '份额来源',
                                                  `remain_shares` decimal(20,2) DEFAULT NULL COMMENT '投资人对本支基金的最新持有份额数',
                                                  `ori_balance` decimal(20,2) DEFAULT NULL COMMENT '原确定金额',
                                                  `ori_shares` decimal(20,2) DEFAULT NULL COMMENT '原确定份额',
                                                  `ori_net_value` decimal(7,4) DEFAULT NULL COMMENT '原单位净值',
                                                  `ori_source` varchar(2) DEFAULT NULL COMMENT '原份额来源',
                                                  `request_date` varchar(8) DEFAULT NULL COMMENT '原申请日期',
                                                  `hold_day` varchar(20) DEFAULT NULL COMMENT '持有天数',
                                                  `deducted_balance` decimal(20,2) DEFAULT NULL COMMENT '已计提业绩提成金额',
                                                  `last_deduct_nav` decimal(7,4) DEFAULT NULL COMMENT '上次计提净值',
                                                  `last_deduct_total_nav` decimal(7,4) DEFAULT NULL COMMENT '上次计提累计净值',
                                                  `last_deduct_date` varchar(8) DEFAULT NULL COMMENT '上次计提时间',
                                                  `trust_no` varchar(2) CHARACTER SET utf8 NOT NULL COMMENT '数据字典：托管人',
                                                  `admin` varchar(8) CHARACTER SET utf8 NOT NULL COMMENT '租户名',
                                                  `unique_key` varchar(255) DEFAULT NULL COMMENT '唯一索引：用于插入',
                                                  `version` varchar(36) CHARACTER SET utf8 DEFAULT NULL COMMENT '版本',
                                                  `remark` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '备注',
                                                  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
                                                  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
                                                  `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                  PRIMARY KEY (`id`),
                                                  UNIQUE KEY `unique_key` (`unique_key`) USING BTREE,
                                                  KEY `query_key` (`admin`,`seq_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=320 DEFAULT CHARSET=utf8mb4 COMMENT='基金持有信息表';


UPDATE `custody_table_permission` SET `tableName` = 'cust_share_detail_info', `service_name` = 'custShareDetailInfoService', `version` = NULL, `remark` = '基金持有份额明细表', `create_time` = NULL, `update_time` = NULL, `is_deleted` = 0 WHERE `id` = 11;
UPDATE `custody_table_permission` SET `tableName` = 'fund_temp_fare_info', `service_name` = 'fundTempFareInfoService', `version` = NULL, `remark` = '基金估值表费用信息表', `create_time` = NULL, `update_time` = NULL, `is_deleted` = 0 WHERE `id` = 14;

-- 新加的字典表

-- ----------------------------
-- Table structure for custody_data_dictionary_share_source
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_share_source`;
CREATE TABLE `custody_data_dictionary_share_source`  (
                                                         `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                         `key_str` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'key',
                                                         `value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'value',
                                                         `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                         `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                         `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                         `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                         `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                         PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 41 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：份额来源' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_share_source
-- ----------------------------
INSERT INTO `custody_data_dictionary_share_source` VALUES (1, '0', '认购所得', NULL, NULL, '2022-01-19 16:38:02', '2022-01-19 16:38:02', 0);
INSERT INTO `custody_data_dictionary_share_source` VALUES (2, '1', '申购所得', NULL, NULL, '2022-01-19 16:38:02', '2022-01-19 16:38:02', 0);
INSERT INTO `custody_data_dictionary_share_source` VALUES (3, '2', '分红所得', NULL, NULL, '2022-01-19 16:38:02', '2022-01-19 16:38:02', 0);
INSERT INTO `custody_data_dictionary_share_source` VALUES (4, '3', '基金转换所得', NULL, NULL, '2022-01-19 16:38:02', '2022-01-19 16:38:02', 0);
INSERT INTO `custody_data_dictionary_share_source` VALUES (5, '4', '非交易过户所得', NULL, NULL, '2022-01-19 16:38:02', '2022-01-19 16:38:02', 0);
INSERT INTO `custody_data_dictionary_share_source` VALUES (6, '5', '转托管所得', NULL, NULL, '2022-01-19 16:38:02', '2022-01-19 16:38:02', 0);
INSERT INTO `custody_data_dictionary_share_source` VALUES (7, '6', '份额调整所得', NULL, NULL, '2022-01-19 16:38:02', '2022-01-19 16:38:02', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_share_source_details
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_share_source_details`;
CREATE TABLE `custody_data_dictionary_share_source_details`  (
                                                                 `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                 `dic_id` int(20) DEFAULT NULL COMMENT '字典id',
                                                                 `trust_no` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典：托管人',
                                                                 `origin_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '托管方数据值',
                                                                 `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                 `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                 `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                 `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                 `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                 PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 52 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：份额来源各托管细节表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_share_source_details
-- ----------------------------
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (1, 1, '34', '0', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (2, 2, '34', '1', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (3, 3, '34', '2', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (4, 4, '34', '3', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (5, 5, '34', '4', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (6, 5, '34', '5', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (7, 7, '34', '6', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (8, 1, '21', '0', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (9, 2, '21', '1', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (10, 3, '21', '2', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (11, 4, '21', '3', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (12, 5, '21', '4', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (13, 5, '21', '5', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);
INSERT INTO `custody_data_dictionary_share_source_details` VALUES (14, 7, '21', '6', NULL, NULL, '2022-01-19 16:24:15', '2022-01-19 16:24:15', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_type_of_open_day
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_type_of_open_day`;
CREATE TABLE `custody_data_dictionary_type_of_open_day`  (
                                                             `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                             `key_str` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'key',
                                                             `value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'value',
                                                             `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                             `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                             `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                             `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                             `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                             PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：开放日类型' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_type_of_open_day
-- ----------------------------
INSERT INTO `custody_data_dictionary_type_of_open_day` VALUES (1, '0', '固定开放', NULL, NULL, '2022-03-21 20:01:28', '2022-03-21 20:01:31', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day` VALUES (2, '1', '临时开放', NULL, NULL, '2022-03-21 20:01:28', '2022-03-21 20:01:31', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day` VALUES (3, '2', '固定开放和临时开放', NULL, NULL, '2022-03-21 20:01:28', '2022-03-21 20:01:31', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_type_of_open_day_details
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_type_of_open_day_details`;
CREATE TABLE `custody_data_dictionary_type_of_open_day_details`  (
                                                                     `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                     `dic_id` int(20) DEFAULT NULL COMMENT '字典id',
                                                                     `trust_no` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典：托管人',
                                                                     `origin_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '托管方数据值',
                                                                     `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                     `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                     `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                     `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                     `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                     PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：开放日类型deatails' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_type_of_open_day_details
-- ----------------------------
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (1, 1, '34', '0', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (2, 2, '34', '1', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (3, 1, '25', '固开', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (4, 2, '25', '临开', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (5, 1, '38', '0', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (6, 2, '38', '1', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (7, 1, '22', 'fixed', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (8, 2, '22', 'unfixed', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (9, 1, '31', '0', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (10, 2, '31', '1', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (11, 3, '31', '2', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (12, 1, '21', '0', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (13, 2, '21', '1', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (14, 1, '36', '0', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);
INSERT INTO `custody_data_dictionary_type_of_open_day_details` VALUES (15, 2, '36', '1', NULL, NULL, '2022-03-21 20:02:50', '2022-03-21 20:02:53', 0);



-- ----------------------------
-- Table structure for custody_data_dictionary_open_state
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_open_state`;
CREATE TABLE `custody_data_dictionary_open_state`  (
                                                       `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                       `type_key` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型key',
                                                       `key_str` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'key',
                                                       `value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'value',
                                                       `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                       `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                       `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                       `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                       `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                       PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：开发状态' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_open_state
-- ----------------------------
INSERT INTO `custody_data_dictionary_open_state` VALUES (1, '0', '00', '正常开放', NULL, '申购/赎回', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (2, '0', '01', '认购期', NULL, '认购交易', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (3, '0', '02', '发行成功', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (4, '0', '03', '发行失败', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (5, '0', '04', '暂停交易', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (6, '0', '05', '开放赎回', NULL, '赎回', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (7, '0', '06', '开放申购', NULL, '申购', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (8, '0', '07', '认购交易（仅直销）', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (9, '0', '09', '基金终止', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (10, '0', '0B', '分红登记', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (11, '0', '0C', '红利发放', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (12, '0', '0D', '基金清盘', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (13, '0', '0F', '净值归一', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (14, '0', '0G', '业绩报酬', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (15, '0', '0I', '违约赎回', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (16, '1', '10', '正常开放', NULL, '申购/赎回', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (17, '1', '11', '临时开放', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (18, '1', '12', '违约赎回', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (19, '1', '13', '违约申购', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (20, '1', '15', '开放赎回', NULL, '赎回', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (21, '1', '16', '开放申购', NULL, '申购', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (22, '1', '1T', '特殊业务', NULL, '', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (23, '2', '21', '正常开放', NULL, '申购/赎回', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (24, '2', '23', '开放申购', NULL, '申购', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);
INSERT INTO `custody_data_dictionary_open_state` VALUES (25, '2', '24', '开放赎回', NULL, '赎回', '2022-03-21 20:15:42', '2022-03-21 20:15:45', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_open_state_details
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_open_state_details`;
CREATE TABLE `custody_data_dictionary_open_state_details`  (
                                                               `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                               `dic_id` int(20) DEFAULT NULL COMMENT '字典id',
                                                               `trust_no` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典：托管人',
                                                               `origin_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '托管方数据值',
                                                               `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                               `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                               `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                               `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                               `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                               PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 61 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：开发状态 deatails' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_open_state_details
-- ----------------------------
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (1, 1, '34', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (2, 6, '34', '2', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (3, 7, '34', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (4, 1, '25', '申购/赎回', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (5, 2, '25', '认购交易', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (6, 6, '25', '赎回', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (7, 7, '25', '申购', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (8, 8, '25', '认购交易（仅直销）', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (9, 1, '38', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (10, 6, '38', '4', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (11, 7, '38', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (12, 1, '22', 'both', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (13, 6, '22', 'redeem', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (14, 7, '22', 'purchase', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (15, 1, '31', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (16, 6, '31', '4', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (17, 7, '31', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (18, 1, '21', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (19, 6, '21', '2', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (20, 7, '21', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (21, 1, '36', '0', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (22, 2, '36', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (23, 3, '36', '2', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (24, 4, '36', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (25, 5, '36', '4', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (26, 6, '36', '5', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (27, 7, '36', '6', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (28, 9, '36', '9', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (29, 10, '36', 'B', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (30, 11, '36', 'C', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (31, 12, '36', 'D', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (32, 13, '36', 'F', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (33, 14, '36', 'G', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (34, 15, '36', 'I', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (35, 16, '34', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (36, 20, '34', '2', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (37, 21, '34', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (38, 16, '25', '申购/赎回', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (39, 20, '25', '赎回', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (40, 21, '25', '申购', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (41, 16, '38', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (42, 20, '38', '4', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (43, 21, '38', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (44, 16, '22', 'both', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (45, 20, '22', 'redeem', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (46, 21, '22', 'purchase', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (47, 16, '31', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (48, 20, '31', '4', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (49, 21, '31', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (50, 16, '21', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (51, 20, '21', '2', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (52, 21, '21', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (53, 16, '36', '0', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (54, 17, '36', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (55, 18, '36', '2', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (56, 19, '36', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (57, 22, '36', 'T', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (58, 23, '31', '1', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (59, 24, '31', '3', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);
INSERT INTO `custody_data_dictionary_open_state_details` VALUES (60, 25, '31', '4', NULL, NULL, '2022-03-21 20:29:28', '2022-03-21 20:29:31', 0);


-- ----------------------------
-- Table structure for custody_data_dictionary_match_status
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_match_status`;
CREATE TABLE `custody_data_dictionary_match_status`  (
                                                         `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                         `key_str` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'key',
                                                         `value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'value',
                                                         `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                         `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                         `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                         `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                         `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                         PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：匹配状态' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_match_status
-- ----------------------------
INSERT INTO `custody_data_dictionary_match_status` VALUES (1, '0', '待匹配', NULL, NULL, '2022-03-21 21:10:53', '2022-03-21 21:10:56', 0);
INSERT INTO `custody_data_dictionary_match_status` VALUES (2, '1', '自动匹配', NULL, NULL, '2022-03-21 21:10:53', '2022-03-21 21:10:56', 0);
INSERT INTO `custody_data_dictionary_match_status` VALUES (3, '2', '管理人手动匹配', NULL, NULL, '2022-03-21 21:10:53', '2022-03-21 21:10:56', 0);
INSERT INTO `custody_data_dictionary_match_status` VALUES (4, '3', '外包人手动匹配', NULL, NULL, '2022-03-21 21:10:53', '2022-03-21 21:10:56', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_match_status_details
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_match_status_details`;
CREATE TABLE `custody_data_dictionary_match_status_details`  (
                                                                 `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                 `dic_id` int(20) DEFAULT NULL COMMENT '字典id',
                                                                 `trust_no` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典：托管人',
                                                                 `origin_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '托管方数据值',
                                                                 `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                 `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                 `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                 `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                 `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                 PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：匹配状态deatails' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_match_status_details
-- ----------------------------
INSERT INTO `custody_data_dictionary_match_status_details` VALUES (1, 1, '38', '0', NULL, NULL, '2022-03-21 21:14:57', '2022-03-21 21:14:59', 0);
INSERT INTO `custody_data_dictionary_match_status_details` VALUES (2, 2, '38', '1', NULL, NULL, '2022-03-21 21:14:57', '2022-03-21 21:14:59', 0);
INSERT INTO `custody_data_dictionary_match_status_details` VALUES (3, 3, '38', '2', NULL, NULL, '2022-03-21 21:14:57', '2022-03-21 21:14:59', 0);
INSERT INTO `custody_data_dictionary_match_status_details` VALUES (4, 4, '38', '3', NULL, NULL, '2022-03-21 21:14:57', '2022-03-21 21:14:59', 0);


-- ----------------------------
-- Table structure for custody_data_dictionary_return_visit_status
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_return_visit_status`;
CREATE TABLE `custody_data_dictionary_return_visit_status`  (
                                                                `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                `key_str` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'key',
                                                                `value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'value',
                                                                `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：回访状态' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_return_visit_status
-- ----------------------------
INSERT INTO `custody_data_dictionary_return_visit_status` VALUES (1, '0', '未回访', NULL, NULL, '2022-03-21 21:20:32', '2022-03-21 21:20:39', 0);
INSERT INTO `custody_data_dictionary_return_visit_status` VALUES (2, '1', '回访成功', NULL, NULL, '2022-03-21 21:20:32', '2022-03-21 21:20:32', 0);
INSERT INTO `custody_data_dictionary_return_visit_status` VALUES (3, '2', '回访失败', NULL, NULL, '2022-03-21 21:20:32', '2022-03-21 21:20:32', 0);
INSERT INTO `custody_data_dictionary_return_visit_status` VALUES (4, '3', '无需回访', NULL, NULL, '2022-03-21 21:20:32', '2022-03-21 21:20:32', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_return_visit_status_details
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_return_visit_status_details`;
CREATE TABLE `custody_data_dictionary_return_visit_status_details`  (
                                                                        `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                        `dic_id` int(20) DEFAULT NULL COMMENT '字典id',
                                                                        `trust_no` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典：托管人',
                                                                        `origin_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '托管方数据值',
                                                                        `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                        `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                        `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                        `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                        `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                        PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：回访状态deatails' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_return_visit_status_details
-- ----------------------------
INSERT INTO `custody_data_dictionary_return_visit_status_details` VALUES (1, 1, '38', '0', NULL, NULL, '2022-03-21 21:22:09', '2022-03-21 21:22:09', 0);
INSERT INTO `custody_data_dictionary_return_visit_status_details` VALUES (2, 2, '38', '1', NULL, NULL, '2022-03-21 21:22:09', '2022-03-21 21:22:09', 0);
INSERT INTO `custody_data_dictionary_return_visit_status_details` VALUES (3, 3, '38', '2', NULL, NULL, '2022-03-21 21:22:09', '2022-03-21 21:22:09', 0);
INSERT INTO `custody_data_dictionary_return_visit_status_details` VALUES (4, 4, '38', '3', NULL, NULL, '2022-03-21 21:22:09', '2022-03-21 21:22:09', 0);



-- ----------------------------
-- Table structure for custody_data_dictionary_order_status
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_order_status`;
CREATE TABLE `custody_data_dictionary_order_status`  (
                                                         `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                         `key_str` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'key',
                                                         `value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'value',
                                                         `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                         `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                         `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                         `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                         `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                         PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：订单状态' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_order_status
-- ----------------------------
INSERT INTO `custody_data_dictionary_order_status` VALUES (1, '1', '已保存', NULL, NULL, '2022-03-21 21:26:43', '2022-03-21 21:26:45', 0);
INSERT INTO `custody_data_dictionary_order_status` VALUES (2, '2', '已提交', NULL, NULL, '2022-03-21 21:26:43', '2022-03-21 21:26:45', 0);
INSERT INTO `custody_data_dictionary_order_status` VALUES (3, '3', 'TA未处理', NULL, NULL, '2022-03-21 21:26:43', '2022-03-21 21:26:45', 0);
INSERT INTO `custody_data_dictionary_order_status` VALUES (4, '4', 'TA处理成功', NULL, NULL, '2022-03-21 21:26:43', '2022-03-21 21:26:45', 0);
INSERT INTO `custody_data_dictionary_order_status` VALUES (5, '5', 'TA处理失败', NULL, NULL, '2022-03-21 21:26:43', '2022-03-21 21:26:45', 0);
INSERT INTO `custody_data_dictionary_order_status` VALUES (6, '6', '已退回', NULL, NULL, '2022-03-21 21:26:43', '2022-03-21 21:26:45', 0);
INSERT INTO `custody_data_dictionary_order_status` VALUES (7, '7', '已删除', NULL, NULL, '2022-03-21 21:26:43', '2022-03-21 21:26:45', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_order_status_details
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_order_status_details`;
CREATE TABLE `custody_data_dictionary_order_status_details`  (
                                                                 `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                 `dic_id` int(20) DEFAULT NULL COMMENT '字典id',
                                                                 `trust_no` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典：托管人',
                                                                 `origin_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '托管方数据值',
                                                                 `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                 `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                 `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                 `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                 `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                 PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：订单状态deatails' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_order_status_details
-- ----------------------------
INSERT INTO `custody_data_dictionary_order_status_details` VALUES (1, 1, '38', '1', NULL, NULL, '2022-03-21 21:29:39', '2022-03-21 21:29:43', 0);
INSERT INTO `custody_data_dictionary_order_status_details` VALUES (2, 2, '38', '2', NULL, NULL, '2022-03-21 21:29:39', '2022-03-21 21:29:43', 0);
INSERT INTO `custody_data_dictionary_order_status_details` VALUES (3, 3, '38', '3', NULL, NULL, '2022-03-21 21:29:39', '2022-03-21 21:29:43', 0);
INSERT INTO `custody_data_dictionary_order_status_details` VALUES (4, 4, '38', '4', NULL, NULL, '2022-03-21 21:29:39', '2022-03-21 21:29:43', 0);
INSERT INTO `custody_data_dictionary_order_status_details` VALUES (5, 5, '38', '5', NULL, NULL, '2022-03-21 21:29:39', '2022-03-21 21:29:43', 0);
INSERT INTO `custody_data_dictionary_order_status_details` VALUES (6, 6, '38', '6', NULL, NULL, '2022-03-21 21:29:39', '2022-03-21 21:29:43', 0);
INSERT INTO `custody_data_dictionary_order_status_details` VALUES (7, 7, '38', '7', NULL, NULL, '2022-03-21 21:29:39', '2022-03-21 21:29:43', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_order_transaction_status
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_order_transaction_status`;
CREATE TABLE `custody_data_dictionary_order_transaction_status`  (
                                                                     `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                     `key_str` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'key',
                                                                     `value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'value',
                                                                     `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                     `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                     `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                     `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                     `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                     PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：订单交易状态' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_order_transaction_status
-- ----------------------------
INSERT INTO `custody_data_dictionary_order_transaction_status` VALUES (1, '0', '无效申请', NULL, NULL, '2022-03-21 21:24:15', '2022-03-21 21:24:18', 0);
INSERT INTO `custody_data_dictionary_order_transaction_status` VALUES (2, '1', '有效申请', NULL, NULL, '2022-03-21 21:24:31', '2022-03-21 21:24:34', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_order_transaction_status_details
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_order_transaction_status_details`;
CREATE TABLE `custody_data_dictionary_order_transaction_status_details`  (
                                                                             `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                             `dic_id` int(20) DEFAULT NULL COMMENT '字典id',
                                                                             `trust_no` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典：托管人',
                                                                             `origin_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '托管方数据值',
                                                                             `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                             `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                             `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                             `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                             `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                             PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：订单交易状态deatails' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_order_transaction_status_details
-- ----------------------------
INSERT INTO `custody_data_dictionary_order_transaction_status_details` VALUES (1, 1, '38', '0', NULL, NULL, '2022-03-21 21:24:48', '2022-03-21 21:24:51', 0);
INSERT INTO `custody_data_dictionary_order_transaction_status_details` VALUES (2, 2, '38', '1', NULL, NULL, '2022-03-21 21:25:02', '2022-03-21 21:25:06', 0);



-- ----------------------------
-- Table structure for custody_data_dictionary_types_of_fee
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_types_of_fee`;
CREATE TABLE `custody_data_dictionary_types_of_fee`  (
                                                         `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                         `key_str` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'key',
                                                         `value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'value',
                                                         `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                         `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                         `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                         `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                         `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                         PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：费用类型' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_types_of_fee
-- ----------------------------
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (1, 'GLF', '管理费', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (2, 'TGF2', '投顾费', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (3, 'XSF', '销售服务费', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (4, 'TGF', '托管费', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (5, 'WBF', '外包服务费', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (6, 'YJBC', '业绩报酬', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (7, 'CGF', '财顾费', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (8, 'KLF', '证券账户开立费', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (9, 'SF', '税费', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (10, 'FJS', '附加税', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (11, 'ZZS', '增值税', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (12, 'JYFY', '交易费用', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (13, 'QT', '其他', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);
INSERT INTO `custody_data_dictionary_types_of_fee` VALUES (14, 'YYFWF', '运营服务费', NULL, NULL, '2022-03-22 09:34:00', '2022-03-22 09:34:02', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_types_of_fee_details
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_types_of_fee_details`;
CREATE TABLE `custody_data_dictionary_types_of_fee_details`  (
                                                                 `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                 `dic_id` int(20) DEFAULT NULL COMMENT '字典id',
                                                                 `trust_no` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典：托管人',
                                                                 `origin_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '托管方数据值',
                                                                 `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                 `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                 `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                 `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                 `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                 PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 29 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：费用类型deatails' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_types_of_fee_details
-- ----------------------------
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (1, 1, '34', 'GLF', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (2, 3, '34', 'XSF', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (3, 4, '34', 'TGF', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (4, 6, '34', 'YJBC', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (5, 10, '34', 'FJS', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (6, 11, '34', 'ZZS', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (7, 14, '34', 'YYFWF', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (8, 1, '36', '1', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (9, 3, '36', '6', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (10, 4, '36', '2', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (11, 10, '36', '5', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (12, 11, '36', '4', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (13, 14, '36', '3', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (14, 1, '38', '管理费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (15, 2, '38', '投顾费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (16, 3, '38', '销售服务费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (17, 4, '38', '托管费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (18, 5, '38', '外包服务费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (19, 1, '30', '管理费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (20, 3, '30', '销售服务费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (21, 4, '30', '托管费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (22, 5, '30', '外包服务费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (23, 6, '30', '管理费业绩报酬', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (24, 7, '30', '财务顾问费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (25, 8, '30', '证券账户开立费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (26, 9, '30', '税费', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:11', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (27, 12, '34', 'JYFY', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:05', 0);
INSERT INTO `custody_data_dictionary_types_of_fee_details` VALUES (28, 13, '34', 'QT', NULL, NULL, '2022-03-22 09:39:05', '2022-03-22 09:39:05', 0);



-- ----------------------------
-- Table structure for custody_data_dictionary_seller_status
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_seller_status`;
CREATE TABLE `custody_data_dictionary_seller_status`  (
                                                          `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                          `key_str` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'key',
                                                          `value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'value',
                                                          `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                          `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                          `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                          `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                          `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                          PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：销售商状态' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_seller_status
-- ----------------------------
INSERT INTO `custody_data_dictionary_seller_status` VALUES (1, 'N', '正常', NULL, NULL, '2022-03-22 09:52:04', '2022-03-22 09:52:07', 0);
INSERT INTO `custody_data_dictionary_seller_status` VALUES (2, 'T', '注销', NULL, NULL, '2022-03-22 09:52:19', '2022-03-22 09:52:24', 0);
INSERT INTO `custody_data_dictionary_seller_status` VALUES (3, 'F', '停止新业务', NULL, NULL, '2022-03-22 09:52:38', '2022-03-22 09:52:41', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_seller_status_details
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_seller_status_details`;
CREATE TABLE `custody_data_dictionary_seller_status_details`  (
                                                                  `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                  `dic_id` int(20) DEFAULT NULL COMMENT '字典id',
                                                                  `trust_no` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典：托管人',
                                                                  `origin_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '托管方数据值',
                                                                  `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                  `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                  `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                  `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：销售商状态deatails' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_seller_status_details
-- ----------------------------
INSERT INTO `custody_data_dictionary_seller_status_details` VALUES (1, 1, '30', 'N', NULL, NULL, '2022-03-22 09:53:26', '2022-03-22 09:53:26', 0);
INSERT INTO `custody_data_dictionary_seller_status_details` VALUES (2, 2, '30', 'T', NULL, NULL, '2022-03-22 09:53:26', '2022-03-22 09:53:26', 0);
INSERT INTO `custody_data_dictionary_seller_status_details` VALUES (3, 3, '30', 'F', NULL, NULL, '2022-03-22 09:53:22', '2022-03-22 09:53:26', 0);



-- ----------------------------
-- Table structure for custody_data_dictionary_type_of_seller
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_type_of_seller`;
CREATE TABLE `custody_data_dictionary_type_of_seller`  (
                                                           `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                           `key_str` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'key',
                                                           `value` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'value',
                                                           `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                           `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                           `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                           `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                           `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                           PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：销售商类型' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_type_of_seller
-- ----------------------------
INSERT INTO `custody_data_dictionary_type_of_seller` VALUES (1, '0', '直销', NULL, NULL, '2022-03-22 09:56:41', '2022-03-22 09:56:41', 0);
INSERT INTO `custody_data_dictionary_type_of_seller` VALUES (2, '1', '银行', NULL, NULL, '2022-03-22 09:56:41', '2022-03-22 09:56:41', 0);
INSERT INTO `custody_data_dictionary_type_of_seller` VALUES (3, '2', '券商', NULL, NULL, '2022-03-22 09:56:41', '2022-03-22 09:56:41', 0);
INSERT INTO `custody_data_dictionary_type_of_seller` VALUES (4, '3', '第三方销售', NULL, NULL, '2022-03-22 09:56:41', '2022-03-22 09:56:41', 0);
INSERT INTO `custody_data_dictionary_type_of_seller` VALUES (5, '4', '虚拟销售商', NULL, NULL, '2022-03-22 09:56:41', '2022-03-22 09:56:44', 0);

-- ----------------------------
-- Table structure for custody_data_dictionary_type_of_seller_details
-- ----------------------------
DROP TABLE IF EXISTS `custody_data_dictionary_type_of_seller_details`;
CREATE TABLE `custody_data_dictionary_type_of_seller_details`  (
                                                                   `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
                                                                   `dic_id` int(20) DEFAULT NULL COMMENT '字典id',
                                                                   `trust_no` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典：托管人',
                                                                   `origin_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '托管方数据值',
                                                                   `version` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本',
                                                                   `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                                   `create_time` datetime(0) DEFAULT NULL COMMENT '创建时间',
                                                                   `update_time` datetime(0) DEFAULT NULL COMMENT '更新时间',
                                                                   `is_deleted` int(1) DEFAULT 0 COMMENT '是否删除(有效|0,无效|1)',
                                                                   PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典：销售商类型deatails' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of custody_data_dictionary_type_of_seller_details
-- ----------------------------
INSERT INTO `custody_data_dictionary_type_of_seller_details` VALUES (1, 1, '30', '0', NULL, NULL, NULL, '2022-03-22 09:57:50', 0);
INSERT INTO `custody_data_dictionary_type_of_seller_details` VALUES (2, 2, '30', '1', NULL, NULL, NULL, '2022-03-22 09:57:50', 0);
INSERT INTO `custody_data_dictionary_type_of_seller_details` VALUES (3, 3, '30', '2', NULL, NULL, NULL, '2022-03-22 09:57:50', 0);
INSERT INTO `custody_data_dictionary_type_of_seller_details` VALUES (4, 4, '30', '3', NULL, NULL, NULL, '2022-03-22 09:57:50', 0);
INSERT INTO `custody_data_dictionary_type_of_seller_details` VALUES (5, 5, '30', '4', NULL, NULL, NULL, '2022-03-22 09:57:50', 0);

-- 新加的字典表配置
UPDATE `custody_data_dictionary_directory` SET `dic_type` = 'accountType', `dic_description` = '账号类型', `service_name` = 'dataDictionaryAccountTypeService', `version` = NULL, `remark` = NULL, `create_time` = '2022-03-22 15:02:26', `update_time` = '2022-03-22 15:02:29', `is_deleted` = 0 WHERE `id` = 28;
INSERT INTO `custody_data_dictionary_directory`(`id`, `dic_type`, `dic_description`, `service_name`, `version`, `remark`, `create_time`, `update_time`, `is_deleted`) VALUES (29, 'shareSource', '份额来源', 'dataDictionaryShareSourceService', NULL, NULL, '2022-03-22 15:00:20', '2022-03-22 15:00:20', 0);
INSERT INTO `custody_data_dictionary_directory`(`id`, `dic_type`, `dic_description`, `service_name`, `version`, `remark`, `create_time`, `update_time`, `is_deleted`) VALUES (30, 'typeOfOpenDay', '开放日类型', 'dataDictionaryTypeOfOpenDayService', NULL, NULL, '2022-03-22 15:00:20', '2022-03-22 15:00:20', 0);
INSERT INTO `custody_data_dictionary_directory`(`id`, `dic_type`, `dic_description`, `service_name`, `version`, `remark`, `create_time`, `update_time`, `is_deleted`) VALUES (31, 'openState', '开放状态', 'dataDictionaryOpenStateService', NULL, NULL, '2022-03-22 15:00:20', '2022-03-22 15:00:20', 0);
INSERT INTO `custody_data_dictionary_directory`(`id`, `dic_type`, `dic_description`, `service_name`, `version`, `remark`, `create_time`, `update_time`, `is_deleted`) VALUES (32, 'matchStatus', '匹配状态', 'dataDictionaryMatchStatusService', NULL, NULL, '2022-03-22 15:00:20', '2022-03-22 15:00:20', 0);
INSERT INTO `custody_data_dictionary_directory`(`id`, `dic_type`, `dic_description`, `service_name`, `version`, `remark`, `create_time`, `update_time`, `is_deleted`) VALUES (33, 'returnVisitStatus', '回访状态', 'dataDictionaryReturnVisitStatusService', NULL, NULL, '2022-03-22 15:00:20', '2022-03-22 15:00:20', 0);
INSERT INTO `custody_data_dictionary_directory`(`id`, `dic_type`, `dic_description`, `service_name`, `version`, `remark`, `create_time`, `update_time`, `is_deleted`) VALUES (34, 'orderTransactionStatus', '订单交易状态', 'dataDictionaryOrderTransactionStatusService', NULL, NULL, '2022-03-22 15:00:20', '2022-03-22 15:00:20', 0);
INSERT INTO `custody_data_dictionary_directory`(`id`, `dic_type`, `dic_description`, `service_name`, `version`, `remark`, `create_time`, `update_time`, `is_deleted`) VALUES (35, 'orderStatus', '订单状态', 'dataDictionaryOrderStatusService', NULL, NULL, '2022-03-22 15:00:20', '2022-03-22 15:00:20', 0);
INSERT INTO `custody_data_dictionary_directory`(`id`, `dic_type`, `dic_description`, `service_name`, `version`, `remark`, `create_time`, `update_time`, `is_deleted`) VALUES (36, 'typesOfFee', '费用类型', 'dataDictionaryTypesOfFeeService', NULL, NULL, '2022-03-22 15:00:20', '2022-03-22 15:00:20', 0);
INSERT INTO `custody_data_dictionary_directory`(`id`, `dic_type`, `dic_description`, `service_name`, `version`, `remark`, `create_time`, `update_time`, `is_deleted`) VALUES (37, 'sellerStatus', '销售商状态', 'dataDictionarySellerStatusService', NULL, NULL, '2022-03-22 15:00:20', '2022-03-22 15:00:20', 0);
INSERT INTO `custody_data_dictionary_directory`(`id`, `dic_type`, `dic_description`, `service_name`, `version`, `remark`, `create_time`, `update_time`, `is_deleted`) VALUES (38, 'typeOfSeller', '销售商类型', 'dataDictionaryTypeOfSellerService', NULL, NULL, '2022-03-22 15:00:20', '2022-03-22 15:00:20', 0);

-- 关于删除未复核的数据
DELETE from `custody_fund_net_value_info` where `check_status` = '0' and `trust_no` in ('22','34');

-- 关于修改invoke_type 长度
alter table custody_invoke_record MODIFY `invoke_type` varchar(200) DEFAULT '' COMMENT '调用类型：即调用哪个接口';
-- 删除业务类型的冗余一些数据
update custody_data_dictionary_business_name_details set origin_value='卖出' where id =283;
DELETE from custody_data_dictionary_business_name_details where dic_id=1 and trust_no='21' and origin_value='20';
DELETE from custody_data_dictionary_business_name_details where dic_id=2 and trust_no='21' and origin_value='22';
DELETE from custody_data_dictionary_business_name_details where dic_id=3 and trust_no='21' and origin_value='24';
DELETE from custody_data_dictionary_business_name_details where dic_id=4 and trust_no='21' and origin_value='26';
DELETE from custody_data_dictionary_business_name_details where dic_id=7 and trust_no='21' and origin_value='29';