You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
taoyuan/document/数据库/taoyuan_trip-桃源数据库备份-2021-5...

272 lines
14 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
Navicat Premium Data Transfer
Source Server : 腾讯云测试
Source Server Type : MySQL
Source Server Version : 80024
Source Host : 1.116.136.247:3306
Source Schema : taoyuan_trip
Target Server Type : MySQL
Target Server Version : 80024
File Encoding : 65001
Date: 20/05/2021 15:51:02
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for activies
-- ----------------------------
DROP TABLE IF EXISTS `activies`;
CREATE TABLE `activies` (
`activities_id` int(0) NOT NULL,
`activities_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动名称',
`activies_logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'logo',
`activies_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '活动内容',
`start_date` bigint(0) NOT NULL COMMENT '开始时间。天',
`end_date` bigint(0) NOT NULL COMMENT '结束时间。天',
`start_time` int(0) NOT NULL DEFAULT 0 COMMENT '开始时间段0-24',
`end_time` int(0) NOT NULL COMMENT '结束时间段0-24',
`max_count` int(0) NULL DEFAULT 0 COMMENT '每个活动人数上限',
`is_valid` int(0) NOT NULL DEFAULT 0 COMMENT '是否下架.默认有效。管理员可以下架活动',
`remarks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
PRIMARY KEY (`activities_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of activies
-- ----------------------------
-- ----------------------------
-- Table structure for activities_type
-- ----------------------------
DROP TABLE IF EXISTS `activities_type`;
CREATE TABLE `activities_type` (
`activities_type_id` int(0) NOT NULL,
`activities_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动名字',
PRIMARY KEY (`activities_type_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动分类' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of activities_type
-- ----------------------------
-- ----------------------------
-- Table structure for advise
-- ----------------------------
DROP TABLE IF EXISTS `advise`;
CREATE TABLE `advise` (
`advise_id` int(0) NOT NULL AUTO_INCREMENT,
`advise_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '留言板标题',
`advise_logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Logo可以不设置',
`advise_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '留言内容',
`create_time` bigint(0) NOT NULL COMMENT '创建时间',
`user_id` int(0) NOT NULL COMMENT '发表人',
`advise_type_id` int(0) NULL DEFAULT NULL COMMENT '留言板分类id',
`is_valid` int(0) NOT NULL DEFAULT 0 COMMENT '是否审核通过。管理员审核通过才能显示默认0审核完1',
PRIMARY KEY (`advise_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '留言板表\r\n' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of advise
-- ----------------------------
-- ----------------------------
-- Table structure for advise_reply
-- ----------------------------
DROP TABLE IF EXISTS `advise_reply`;
CREATE TABLE `advise_reply` (
`repley_id` int(0) NOT NULL,
`advise_id` int(0) NOT NULL COMMENT '留言ID',
`reply` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '回复内容',
`create_time` bigint(0) NOT NULL COMMENT '回复时间',
`user_id` int(0) NOT NULL COMMENT '回复人员,目前只支持管理员回复',
PRIMARY KEY (`repley_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '留言回复表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of advise_reply
-- ----------------------------
-- ----------------------------
-- Table structure for advise_type
-- ----------------------------
DROP TABLE IF EXISTS `advise_type`;
CREATE TABLE `advise_type` (
`advise_type_id` int(0) NOT NULL AUTO_INCREMENT,
`advise_type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类名字',
PRIMARY KEY (`advise_type_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '留言板分类表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of advise_type
-- ----------------------------
-- ----------------------------
-- Table structure for attractions
-- ----------------------------
DROP TABLE IF EXISTS `attractions`;
CREATE TABLE `attractions` (
`attraction_id` int(0) NOT NULL,
`attraction_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动名称',
`attraction_logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'logo',
`attraction_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '活动内容',
`start_date` bigint(0) NOT NULL COMMENT '开始时间。天',
`end_date` bigint(0) NOT NULL COMMENT '结束时间。天',
`start_time` int(0) NOT NULL DEFAULT 0 COMMENT '开始时间段0-24',
`end_time` int(0) NOT NULL COMMENT '结束时间段0-24',
`max_count` int(0) NULL DEFAULT 0 COMMENT '每个活动人数上限',
`is_valid` int(0) NOT NULL DEFAULT 0 COMMENT '是否下架.默认有效。管理员可以下架活动',
`remarks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
PRIMARY KEY (`attraction_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '景点表(预约用)' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of attractions
-- ----------------------------
-- ----------------------------
-- Table structure for banner
-- ----------------------------
DROP TABLE IF EXISTS `banner`;
CREATE TABLE `banner` (
`banner_id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'ID主键',
`banner_title` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主题',
`banner_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '广告连接',
`banner_index` int(0) NOT NULL DEFAULT 0 COMMENT '索引',
`target_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '点击后跳转的目的链接',
`create_time` bigint(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` bigint(0) NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`banner_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '广告表\r\n' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of banner
-- ----------------------------
-- ----------------------------
-- Table structure for news
-- ----------------------------
DROP TABLE IF EXISTS `news`;
CREATE TABLE `news` (
`news_id` int(0) NOT NULL AUTO_INCREMENT,
`news_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '新闻标题',
`section_id` int(0) NOT NULL COMMENT '所属板块以及分类',
`news_logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '配图地址',
`news_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '新闻内容',
`create_time` bigint(0) NOT NULL COMMENT '创建时间',
`news_type` int(0) NOT NULL DEFAULT 1 COMMENT '新闻样式。目前支持12两种样式',
`is_valid` int(0) NOT NULL DEFAULT 1 COMMENT '是否有效默认有效',
PRIMARY KEY (`news_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '新闻表。目前所有得新闻统一保存' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of news
-- ----------------------------
-- ----------------------------
-- Table structure for news_pictures
-- ----------------------------
DROP TABLE IF EXISTS `news_pictures`;
CREATE TABLE `news_pictures` (
`pic_id` int(0) NOT NULL,
`news_id` int(0) NOT NULL COMMENT '新闻id',
`pic_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '图片地址',
PRIMARY KEY (`pic_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '新闻配图表。多张配图' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of news_pictures
-- ----------------------------
-- ----------------------------
-- Table structure for section
-- ----------------------------
DROP TABLE IF EXISTS `section`;
CREATE TABLE `section` (
`section_id` int(0) NOT NULL AUTO_INCREMENT,
`section_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '板块或者分类名称',
`parent_id` int(0) NOT NULL DEFAULT 0 COMMENT '父节点ID',
`section_level` int(0) NOT NULL COMMENT '层级',
`create_time` bigint(0) NOT NULL COMMENT '创建时间',
`section_logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '板块配图,可以不设置',
PRIMARY KEY (`section_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '板块以及分类表。第一层级是板块,第二层级是板块下得分类' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of section
-- ----------------------------
-- ----------------------------
-- Table structure for subscribe
-- ----------------------------
DROP TABLE IF EXISTS `subscribe`;
CREATE TABLE `subscribe` (
`subscribe_id` int(0) NOT NULL AUTO_INCREMENT,
`subscribe_type` int(0) NOT NULL COMMENT '预约类型12景点活动',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名字',
`logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'logo',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容介绍',
`start_date` bigint(0) NOT NULL COMMENT '开始日期。天',
`end_date` bigint(0) NOT NULL COMMENT '结束日期。天',
`start_time` int(0) NOT NULL COMMENT '开始时间0-24',
`end_time` int(0) NOT NULL COMMENT '结束时间0-24',
`max_count` int(0) NOT NULL COMMENT '最大人数',
`is_valid` int(0) NOT NULL DEFAULT 1 COMMENT '是否有效。默认1有效0无效',
`create_time` bigint(0) NULL DEFAULT NULL COMMENT '创建时间',
`ahead_day` int(0) NOT NULL DEFAULT 1 COMMENT '需要提前几天。默认1',
PRIMARY KEY (`subscribe_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '可预约表。分景点和活动。都需要新建,跟其他板块的活动,景点不想关' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of subscribe
-- ----------------------------
-- ----------------------------
-- Table structure for user_subscribe
-- ----------------------------
DROP TABLE IF EXISTS `user_subscribe`;
CREATE TABLE `user_subscribe` (
`user_subscribe_id` int(0) NOT NULL,
`type` int(0) NOT NULL DEFAULT 0 COMMENT '预约类型 01 景点,活动',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系人',
`mobile` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '电话',
`heads` int(0) NOT NULL COMMENT '人数',
`dest_date` bigint(0) NOT NULL COMMENT '计划日期',
`dest_time` int(0) NOT NULL COMMENT '计划时间段0-24',
`apply_date` bigint(0) NOT NULL COMMENT '申请日期',
`Notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
`reply` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '处理意见',
`reply_time` bigint(0) NULL DEFAULT NULL COMMENT '处理得时间',
PRIMARY KEY (`user_subscribe_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户预定表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user_subscribe
-- ----------------------------
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
`password` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
`user_logo` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户头像',
`nickname` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '社区昵称',
`gender` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性别',
`openid` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信openid',
`mobile` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号码',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表\r\n' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of users
-- ----------------------------
SET FOREIGN_KEY_CHECKS = 1;