/**
 * @Author: 嗨噜客(三亚) <fm453>
 * @Date:   2024-07-04T19:13:18+08:00
 * @Email:  393213759@qq.com
 * @Last modified by:   fm453
 * @Last modified time: 2024-07-04T19:13:18+08:00
 * @Copyright: www.hiluker.cn
 */

/*
 Navicat MySQL Data Transfer

 Source Server         : 本地
 Source Server Type    : MySQL
 Source Server Version : 50724
 Source Host           : localhost:3306
 Source Schema         : news

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

 Date: 19/08/2023 21:31:52
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for appconfig
-- ----------------------------
DROP TABLE IF EXISTS `appconfig`;
CREATE TABLE `appconfig`  (
                              `id` int(11) NOT NULL AUTO_INCREMENT,
                              `isShowLauncher` tinyint(1) NOT NULL DEFAULT 1 COMMENT '启动页显示开关',
                              `isShowGongGao` tinyint(1) NOT NULL DEFAULT 1 COMMENT '主页公告显示开关',
                              `isShowBanner` tinyint(1) NOT NULL DEFAULT 1 COMMENT '轮播图显示开关',
                              PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = FIXED;

-- ----------------------------
-- Records of appconfig
-- ----------------------------
INSERT INTO `appconfig` VALUES (1, 0, 0, 0);

-- ----------------------------
-- Table structure for appversion
-- ----------------------------
DROP TABLE IF EXISTS `appversion`;
CREATE TABLE `appversion`  (
                               `id` int(11) NOT NULL AUTO_INCREMENT,
                               `isqiangzhi` tinyint(1) NOT NULL DEFAULT 0 COMMENT '强制更新开关',
                               `banbenhao` int(11) NOT NULL COMMENT '版本号',
                               `banbenming` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '版本名',
                               `lianjie` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '下载链接',
                               `shuoming` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '有新版本，是否更新' COMMENT '更新说明',
                               PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of appversion
-- ----------------------------
INSERT INTO `appversion` VALUES (1, 0, 1, '测试', 'http://192.168.2.103:8888/static/test.apk', '请确保以上下载链接地址http://192.168.2.103:8888/static/test.apk的IP地址是自己电脑的局域网IP地址');

-- ----------------------------
-- Table structure for banner
-- ----------------------------
DROP TABLE IF EXISTS `banner`;
CREATE TABLE `banner`  (
                           `id` bigint(20) NOT NULL AUTO_INCREMENT,
                           `imgUrl` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图片地址',
                           `jumpUrl` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'http://www.baidu.com' COMMENT '点击跳转地址',
                           PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of banner
-- ----------------------------
INSERT INTO `banner` VALUES (1, '/static/test.bmp', 'http://www.baidu.com');

-- ----------------------------
-- Table structure for comments
-- ----------------------------
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments`  (
                             `id` bigint(20) NOT NULL AUTO_INCREMENT,
                             `uid` bigint(20) NULL DEFAULT 0 COMMENT '用户ID',
                             `touid` bigint(20) NULL DEFAULT 0 COMMENT '回复id',
                             `newsid` bigint(20) NULL DEFAULT 0 COMMENT '新闻id',
                             `commentid` bigint(20) NULL DEFAULT 0 COMMENT '评论id',
                             `parentid` bigint(20) NULL DEFAULT 0 COMMENT '父评论id',
                             `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '内容',
                             `likes` int(11) NULL DEFAULT 0 COMMENT '点赞数',
                             `addtime` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '添加时间',
                             `at_info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '评论时被@用户的信息（json串）',
                             PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of comments
-- ----------------------------

-- ----------------------------
-- Table structure for fenlei
-- ----------------------------
DROP TABLE IF EXISTS `fenlei`;
CREATE TABLE `fenlei`  (
                           `id` bigint(20) NOT NULL AUTO_INCREMENT,
                           `fenlei` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '新闻分类',
                           PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of fenlei
-- ----------------------------
INSERT INTO `fenlei` VALUES (1, '资讯');
INSERT INTO `fenlei` VALUES (2, '攻略');
INSERT INTO `fenlei` VALUES (3, '公告');
INSERT INTO `fenlei` VALUES (4, '其他');

-- ----------------------------
-- Table structure for gonggao
-- ----------------------------
DROP TABLE IF EXISTS `gonggao`;
CREATE TABLE `gonggao`  (
                            `id` int(11) NOT NULL AUTO_INCREMENT,
                            `content` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公告内容',
                            PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of gonggao
-- ----------------------------
INSERT INTO `gonggao` VALUES (1, '您好,为了您的财物安全，请您务必做好防范，勿轻信低价拉单，注意避免私下交易...');

-- ----------------------------
-- Table structure for guidepage
-- ----------------------------
DROP TABLE IF EXISTS `guidepage`;
CREATE TABLE `guidepage`  (
                              `id` bigint(20) NOT NULL AUTO_INCREMENT,
                              `img` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '图片地址',
                              PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of guidepage
-- ----------------------------
INSERT INTO `guidepage` VALUES (1, '/static/test.bmp');

-- ----------------------------
-- Table structure for history
-- ----------------------------
DROP TABLE IF EXISTS `history`;
CREATE TABLE `history`  (
                            `hid` bigint(20) NOT NULL AUTO_INCREMENT,
                            `newsid` bigint(20) NOT NULL COMMENT '新闻id',
                            `uid` bigint(20) NOT NULL COMMENT '用户ID',
                            PRIMARY KEY (`hid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;


-- ----------------------------
-- Table structure for launcher
-- ----------------------------
DROP TABLE IF EXISTS `launcher`;
CREATE TABLE `launcher`  (
                             `id` int(11) NOT NULL AUTO_INCREMENT,
                             `img` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '图片地址',
                             `showTime` int(11) NOT NULL DEFAULT 3 COMMENT '展示时间',
                             PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of launcher
-- ----------------------------
INSERT INTO `launcher` VALUES (1, '/static/test.bmp', 3);

-- ----------------------------
-- Table structure for lianxiwom
-- ----------------------------
DROP TABLE IF EXISTS `lianxiwom`;
CREATE TABLE `lianxiwom`  (
                              `id` bigint(20) NOT NULL AUTO_INCREMENT,
                              `content` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '联系我们内容如客服电话:xxxx',
                              PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of lianxiwom
-- ----------------------------
INSERT INTO `lianxiwom` VALUES (1, '客服电话:132-1111-1058');

-- ----------------------------
-- Table structure for news
-- ----------------------------
DROP TABLE IF EXISTS `news`;
CREATE TABLE `news`  (
                         `id` bigint(20) NOT NULL AUTO_INCREMENT,
                         `mingcheng` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '新闻标题',
                         `leixing` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '新闻类型',
                         `liulanliang` bigint(20) NOT NULL DEFAULT 0 COMMENT '新闻浏览量销量',
                         `xiangqinghtml` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '新闻详情',
                         `isshangjia` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0上架1下架',
                         `time` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '发布日期',
                         PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT =1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of news
-- ----------------------------

-- ----------------------------
-- Table structure for newsimg
-- ----------------------------
DROP TABLE IF EXISTS `newsimg`;
CREATE TABLE `newsimg`  (
                            `id` bigint(20) NOT NULL AUTO_INCREMENT,
                            `newsid` bigint(20) NOT NULL COMMENT '新闻id',
                            `img` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '新闻图片',
                            PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of newsimg
-- ----------------------------

-- ----------------------------
-- Table structure for resou
-- ----------------------------
DROP TABLE IF EXISTS `resou`;
CREATE TABLE `resou`  (
                          `id` bigint(20) NOT NULL AUTO_INCREMENT,
                          `content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '热搜关键词',
                          `addtime` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '添加时间',
                          PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of resou
-- ----------------------------

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role`  (
                         `id` int(11) NOT NULL AUTO_INCREMENT,
                         `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名字',
                         `desc` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '描述',
                         PRIMARY KEY (`id`) USING BTREE,
                         UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of role
-- ----------------------------
INSERT INTO `role` VALUES (1, 'ROLE_ADMIN', '超级管理员');
INSERT INTO `role` VALUES (2, 'ROLE_USER', '普通用户');
INSERT INTO `role` VALUES (3, 'ROLE_VIP', 'vip用户');
INSERT INTO `role` VALUES (4, 'ROLE_MANAGEMENT', '管理员');

-- ----------------------------
-- Table structure for shoucang
-- ----------------------------
DROP TABLE IF EXISTS `shoucang`;
CREATE TABLE `shoucang`  (
                             `hid` bigint(20) NOT NULL AUTO_INCREMENT,
                             `newsid` bigint(20) NOT NULL COMMENT '新闻id',
                             `uid` bigint(20) NOT NULL COMMENT '用户ID',
                             PRIMARY KEY (`hid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of shoucang
-- ----------------------------

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user`  (
                         `id` bigint(20) NOT NULL AUTO_INCREMENT,
                         `username` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '账号',
                         `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
                         `sex` tinyint(2) NOT NULL DEFAULT 1 COMMENT '性别;1:男,2:女',
                         `birthday` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '生日',
                         `last_login_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '最后登录时间',
                         `score` int(11) NOT NULL DEFAULT 0 COMMENT '用户积分',
                         `coin` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '金币',
                         `balance` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '余额',
                         `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '注册时间',
                         `user_status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '用户状态;0:禁用,1:正常',
                         `user_nickname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称',
                         `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户头像',
                         `addr` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户地址',
                         `last_login_ip` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '最后登录ip',
                         `more` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '扩展属性',
                         PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, 'fm453', '$2a$10$MSkMgo63VGdaw6cqOANRxeDG3NT6I20HNs792CPNNhvvMyxRccEwG', 1, '', '', 0, 0, 26.46, '', 1, '超级管理员', '', '', '', NULL);

-- ----------------------------
-- Table structure for user_roles
-- ----------------------------
DROP TABLE IF EXISTS `user_roles`;
CREATE TABLE `user_roles`  (
                               `id` bigint(20) NOT NULL AUTO_INCREMENT,
                               `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户id',
                               `roles_id` int(11) NULL DEFAULT NULL COMMENT '角色id',
                               PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;


-- ----------------------------
-- Table structure for weihu
-- ----------------------------
DROP TABLE IF EXISTS `weihu`;
CREATE TABLE `weihu`  (
                          `id` int(11) NOT NULL AUTO_INCREMENT,
                          `isweihu` tinyint(1) NOT NULL DEFAULT 0 COMMENT '维护开关',
                          `neirong` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '维护内容',
                          PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of weihu
-- ----------------------------
INSERT INTO `weihu` VALUES (1, 0, '维护通知：为了更好的为您服务，本站正在升级维护中，因此带来不便深表歉意');

-- ----------------------------
-- Table structure for yijianfankui
-- ----------------------------
DROP TABLE IF EXISTS `yijianfankui`;
CREATE TABLE `yijianfankui`  (
                                 `id` bigint(20) NOT NULL AUTO_INCREMENT,
                                 `username` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '反馈人账号',
                                 `pic` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '反馈图片',
                                 `content` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '反馈内容',
                                 `xitongbanben` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户手机系统版本',
                                 `shoujiming` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户手机名称',
                                 `shijian` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '反馈时间',
                                 `huifu` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '回复内容',
                                 `ischuli` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0显示1不显示',
                                 PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of yijianfankui
-- ----------------------------

SET FOREIGN_KEY_CHECKS = 1;
