/*
 Navicat Premium Data Transfer

 Source Server         : 智慧旅游
 Source Server Type    : MySQL
 Source Server Version : 80018
 Source Host           : rm-bp1e2451m5olnc4g6qo.mysql.rds.aliyuncs.com:3306
 Source Schema         : liucheng_smart

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

 Date: 22/06/2022 14:16:39
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for complaint
-- ----------------------------
DROP TABLE IF EXISTS `complaint`;
CREATE TABLE `complaint`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `auth_id` bigint(20) NULL DEFAULT NULL,
  `merchant_id` bigint(20) NULL DEFAULT NULL COMMENT '（已删除）',
  `org_id` bigint(20) NULL DEFAULT NULL COMMENT '机构ID',
  `supplier_id` bigint(20) NULL DEFAULT NULL COMMENT '供应商id',
  `product_id` bigint(20) NULL DEFAULT NULL COMMENT '产品ID',
  `big_type` tinyint(2) NOT NULL COMMENT '大类  1 商品 2游后，3投诉与建议',
  `type` tinyint(2) NULL DEFAULT NULL COMMENT '投诉类型 3投诉 4建议 5举报 6咨询',
  `level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '投诉级别',
  `uid` bigint(20) NULL DEFAULT NULL COMMENT '投诉用户ID',
  `place_incident` bigint(50) NULL DEFAULT NULL COMMENT '景点',
  `be_complained` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '被投诉者',
  `be_complained_industry` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '被投诉者所属行业',
  `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事发地点',
  `source_channel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '投诉来源渠道',
  `acceptance_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '受理人姓名',
  `acceptance_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '受理人工号',
  `acceptance_department` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '受理人部门',
  `acceptance_time` datetime NULL DEFAULT NULL COMMENT '受理时间',
  `is_handle` tinyint(2) NULL DEFAULT 0 COMMENT '是否处理 0未处理 1已处理',
  `context` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '投诉内容',
  `url_img` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图片地址',
  `contact` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人',
  `contact_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
  `video` varchar(1200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频',
  `restore_content` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理/回复内容',
  `restore_uid` bigint(20) NULL DEFAULT NULL COMMENT '处理/回复用户',
  `restore_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理人姓名',
  `restore_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理人电话',
  `restore_pic` varchar(1200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理的图片附件',
  `restore_date` datetime NULL DEFAULT NULL COMMENT '回复时间',
  `complaint_date` datetime NULL DEFAULT NULL COMMENT '投诉时间',
  `creator` bigint(20) NULL DEFAULT NULL,
  `create_date` datetime NULL DEFAULT NULL,
  `is_deleted` tinyint(2) NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 158 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for hy_monitor
-- ----------------------------
DROP TABLE IF EXISTS `hy_monitor`;
CREATE TABLE `hy_monitor`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `auth_id` bigint(20) NULL DEFAULT NULL,
  `mechanism_id` bigint(20) NULL DEFAULT NULL COMMENT '机构ID',
  `type` tinyint(2) NULL DEFAULT NULL COMMENT '监测类型 1.客流量监测 ',
  `quantity` int(11) NULL DEFAULT NULL COMMENT '客流量',
  `mechanism_type` tinyint(2) NULL DEFAULT 1 COMMENT '机构类型 1、景区 2、文保场所 3、高速收费站',
  `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `is_deleted` tinyint(4) NULL DEFAULT 0 COMMENT '是否已删除 0 否 1 是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mechanism_id`(`mechanism_id`) USING BTREE,
  INDEX `auth_id, type, create_date`(`auth_id`, `type`, `create_date`, `mechanism_id`) USING BTREE,
  INDEX `create_date`(`create_date`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8697126 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文旅行业-产业监测系统' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for hy_monitor_consume
-- ----------------------------
DROP TABLE IF EXISTS `hy_monitor_consume`;
CREATE TABLE `hy_monitor_consume`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `auth_id` bigint(20) NULL DEFAULT NULL,
  `mechanism_id` bigint(20) NULL DEFAULT NULL COMMENT '消费场所',
  `user_id` bigint(255) NULL DEFAULT NULL COMMENT '消费用户',
  `source_area` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源地区',
  `money` decimal(11, 2) NULL DEFAULT NULL COMMENT '消费金额',
  `gender` tinyint(4) NULL DEFAULT 1 COMMENT '性别 1、男 2、女',
  `age` int(11) NULL DEFAULT 0 COMMENT '年龄',
  `age_section` tinyint(4) NULL DEFAULT 1 COMMENT '1、0-17岁 2、18-22岁 3、23-26岁 4、26岁以上',
  `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `is_deleted` tinyint(4) NULL DEFAULT 0 COMMENT '是否已删除 0 否 1 是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_authid_isdeleted_userid_sourcearea`(`auth_id`, `is_deleted`, `user_id`, `source_area`) USING BTREE,
  INDEX `idx_authid_isdeleted_money`(`auth_id`, `is_deleted`, `money`) USING BTREE,
  INDEX `idx_authid_isdeleted_createdate`(`auth_id`, `is_deleted`, `create_date`) USING BTREE,
  INDEX `idx_isdeleted_createdate`(`is_deleted`, `create_date`) USING BTREE,
  INDEX `idx_authid_isdeleted_userid_agesection`(`auth_id`, `is_deleted`, `user_id`, `age_section`) USING BTREE,
  INDEX `create_date`(`create_date`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3446487 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文旅行业-产业监测系统-用户消费数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for hy_monitor_vehicle
-- ----------------------------
DROP TABLE IF EXISTS `hy_monitor_vehicle`;
CREATE TABLE `hy_monitor_vehicle`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `auth_id` bigint(20) NULL DEFAULT NULL,
  `mechanism_id` bigint(20) NULL DEFAULT NULL COMMENT '机构ID',
  `speed_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '高速路口名称',
  `vehicle_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '车牌号',
  `source_area` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源地区',
  `mechanism_type` tinyint(2) NULL DEFAULT 1 COMMENT '机构类型 1、景区 2、文保场所 3、高速收费站',
  `in_or_out` tinyint(4) NULL DEFAULT 1 COMMENT '进或者出 1、进 2、出',
  `vehicle_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '车辆类型',
  `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `is_deleted` tinyint(4) NULL DEFAULT 0 COMMENT '是否已删除 0 否 1 是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_authid_isdeleted_createdate`(`auth_id`, `is_deleted`, `create_date`) USING BTREE,
  INDEX `idx_authid_isdeleted_sourcearea`(`auth_id`, `is_deleted`, `source_area`) USING BTREE,
  INDEX `auth_id, mechanism_id, is_deleted`(`auth_id`, `mechanism_id`, `is_deleted`) USING BTREE,
  INDEX `auth_id, mechanism_id, mechanism_type, in_or_out, create_date, i`(`auth_id`, `mechanism_id`, `mechanism_type`, `in_or_out`, `create_date`, `is_deleted`) USING BTREE,
  INDEX `idx_authid_isdeleted_vehicletype`(`auth_id`, `is_deleted`, `vehicle_type`) USING BTREE,
  INDEX `idx_mechanismtype_authid_isdeleted_speedname`(`mechanism_type`, `auth_id`, `is_deleted`, `speed_name`) USING BTREE,
  INDEX `idx_mechanismtype_inorout_authid_isdeleted_createdate`(`mechanism_type`, `in_or_out`, `auth_id`, `is_deleted`, `create_date`) USING BTREE,
  INDEX `auth_id, mechanism_type`(`auth_id`, `mechanism_type`, `is_deleted`) USING BTREE,
  INDEX `auth_id, mechanism_id, mechanism_type, in_or_out, vehicle_type`(`auth_id`, `mechanism_id`, `mechanism_type`, `in_or_out`, `vehicle_type`, `is_deleted`, `source_area`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3410139 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文旅行业-产业监测系统-车流量数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for travel_audit_record
-- ----------------------------
DROP TABLE IF EXISTS `travel_audit_record`;
CREATE TABLE `travel_audit_record`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `auth_id` bigint(20) NULL DEFAULT NULL,
  `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者',
  `industry_id` bigint(20) NULL DEFAULT NULL COMMENT '机构ID',
  `industry_type` tinyint(2) NULL DEFAULT NULL COMMENT '机构类型 1 酒店  2 景区 3 旅游局',
  `audit_id` bigint(20) NULL DEFAULT NULL COMMENT '审核人用户ID',
  `travel_id` bigint(20) NULL DEFAULT NULL COMMENT '旅行社ID',
  `audit_type` tinyint(2) NULL DEFAULT NULL COMMENT '审核状态 0 审核通过 1 审核驳回',
  `advice` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审核意见',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `is_deleted` tinyint(2) NULL DEFAULT 0 COMMENT '删除状态 0 正常 1 删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '招徕奖励-审核记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for travel_hotel_audit
-- ----------------------------
DROP TABLE IF EXISTS `travel_hotel_audit`;
CREATE TABLE `travel_hotel_audit`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `auth_id` bigint(20) NULL DEFAULT NULL,
  `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建日期',
  `solicit_id` bigint(20) NULL DEFAULT NULL COMMENT '旅行社信息申报ID',
  `travel_id` bigint(20) NULL DEFAULT NULL COMMENT '旅游团ID',
  `tour_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '出行团号（团队号）',
  `hotel_id` bigint(20) NULL DEFAULT NULL COMMENT '酒店ID',
  `people_num` int(5) NULL DEFAULT 0 COMMENT '人数',
  `arrival_date` datetime NULL DEFAULT NULL COMMENT '到达日期',
  `stay_days` int(5) NULL DEFAULT 0 COMMENT '入住天数',
  `file` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发票等文件（图片）',
  `remarks` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  `audit_state` tinyint(2) NULL DEFAULT 0 COMMENT '审核状态 -1 撤销 0 待复核 1 复核通过 2 复核驳回',
  `complete_date` datetime NULL DEFAULT NULL COMMENT '完成日期（ 申报通过 或者 撤销申报的日期 ）',
  `is_deleted` tinyint(2) NULL DEFAULT 0 COMMENT '0 正常 1 删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '旅行社  酒店申报表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for travel_report
-- ----------------------------
DROP TABLE IF EXISTS `travel_report`;
CREATE TABLE `travel_report`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `auth_id` bigint(20) NULL DEFAULT NULL,
  `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建日期',
  `is_deleted` tinyint(2) NULL DEFAULT 0 COMMENT '0 正常 1 删除',
  `travel_id` bigint(20) NULL DEFAULT NULL COMMENT '旅行社ID',
  `leader_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '领队 or 导游姓名',
  `start_date` date NULL DEFAULT NULL COMMENT '领队带团起始日期',
  `end_date` date NULL DEFAULT NULL COMMENT '领队带团终止日期',
  `tour_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '出行团号（团队号）',
  `tourist_num` int(5) NULL DEFAULT 0 COMMENT '游客人数',
  `credential_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '相关证件号',
  `credential_pic` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '相关证件资料',
  `note` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  `report_progress` tinyint(2) NULL DEFAULT 0 COMMENT '申报进度  -1 撤销申请 0 申报中 1 酒店,景区申报通过 2 旅游局申报通过 3 申报驳回',
  `complete_date` datetime NULL DEFAULT NULL COMMENT '完成日期（ 申报通过 或者 撤销申报的日期 ）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1492126723424608303 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '旅行社团报表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for travel_scenic_audit
-- ----------------------------
DROP TABLE IF EXISTS `travel_scenic_audit`;
CREATE TABLE `travel_scenic_audit`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `auth_id` bigint(20) NULL DEFAULT NULL,
  `creator` bigint(20) NULL DEFAULT NULL,
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建日期',
  `solicit_id` bigint(20) NULL DEFAULT NULL COMMENT '旅行社信息申报ID',
  `travel_id` bigint(20) NULL DEFAULT NULL COMMENT '旅行社ID',
  `tour_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '出行团号（团队号）',
  `scenic_id` bigint(20) NULL DEFAULT NULL COMMENT '景区ID',
  `arrival_date` datetime NULL DEFAULT NULL COMMENT '到达时间',
  `people_num` int(5) NULL DEFAULT NULL COMMENT '人数',
  `ticket_price` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '门票单价',
  `file` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发票等文件（图片）',
  `remarks` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  `audit_state` tinyint(2) NULL DEFAULT 0 COMMENT '审核状态 -1 撤销 0 待复核 1 复核通过 2 复核驳回',
  `complete_date` datetime NULL DEFAULT NULL COMMENT '完成日期（ 申报通过 或者 撤销申报的日期 ）',
  `is_deleted` tinyint(2) NULL DEFAULT 0 COMMENT '0 正常 1 删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '旅行社 景区申报表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
