加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bysj03.sql 6.51 KB
一键复制 编辑 原始数据 按行查看 历史
/*
Navicat Premium Data Transfer
Source Server : phpstudy_mysql
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : bysj03
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 22/10/2020 09:15:01
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for activity
-- ----------------------------
DROP TABLE IF EXISTS `activity`;
CREATE TABLE `activity` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键,无意义',
`userid` int(11) NULL DEFAULT NULL COMMENT '外键,userid',
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '活动标题',
`activity` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '活动内容',
`addtime` datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
`endtime` datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
`status` int(255) NULL DEFAULT 0 COMMENT '状态,0 未开启 1 开启',
PRIMARY KEY (`id`) USING BTREE,
INDEX `userid`(`userid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键,无意义',
`userid` int(11) NULL DEFAULT NULL COMMENT '外键,userid',
`newsid` int(11) NULL DEFAULT NULL COMMENT '外键,文章id',
`comment` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '评论',
`addtime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '评论时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `userid`(`userid`) USING BTREE,
INDEX `newsid`(`newsid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 18 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for news
-- ----------------------------
DROP TABLE IF EXISTS `news`;
CREATE TABLE `news` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键,无意义',
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标题',
`typeid` int(11) NULL DEFAULT NULL COMMENT '外键,typeid',
`introduction` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '简介',
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '内容',
`addtime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '添加时间',
`releasetime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '更新时间(发布时间)',
`userid` int(11) NULL DEFAULT NULL COMMENT '外键,用户名',
`status` int(255) NULL DEFAULT 0 COMMENT '状态 0 未提交 1 未审核 2 未通过 3 通过',
`click` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '点击量',
PRIMARY KEY (`id`) USING BTREE,
INDEX `typeid`(`typeid`) USING BTREE,
INDEX `userid`(`userid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for notice
-- ----------------------------
DROP TABLE IF EXISTS `notice`;
CREATE TABLE `notice` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键,无意义',
`userid` int(11) NULL DEFAULT NULL,
`notice` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '通知内容',
`addtime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '发布时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `userid`(`userid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键,无意义',
`rolename` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色名',
`roledesc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色描述',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for type
-- ----------------------------
DROP TABLE IF EXISTS `type`;
CREATE TABLE `type` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键,无意义',
`typename` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型名',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键,无意义',
`username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名,不为空,唯一',
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码,不为空,加密',
`nickname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'Galaxy' COMMENT '昵称',
`sex` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '保密' COMMENT '性别',
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
`phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号',
`addtime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '注册时间',
`img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'http://localhost:8010/upload/img/userImg/default.jpg' COMMENT '头像,url',
`roleid` int(11) NULL DEFAULT NULL COMMENT '外键,角色id',
`status` int(255) NULL DEFAULT 0 COMMENT '状态 0 正常 1 封号',
PRIMARY KEY (`id`) USING BTREE,
INDEX `roleid`(`roleid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
INSERT INTO `role` VALUES (1, 'ROOT', '超级管理员');
INSERT INTO `role` VALUES (2, 'ADMIN', '文章审核员');
INSERT INTO `role` VALUES (3, 'NEWSUSER', '新闻工作者');
INSERT INTO `role` VALUES (4, 'USER', '普通用户');
INSERT INTO `user` (username,password,roleid) VALUES ('root', '$2a$10$RMcxK2B6Xz/kxglCH/kGcO57XatAmKeg4DF0/ftyKWafl5t6Z95fS', 1);
SET FOREIGN_KEY_CHECKS = 1;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化