代码拉取完成,页面将自动刷新
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80033
Source Host : localhost:3306
Source Schema : ok
Target Server Type : MySQL
Target Server Version : 80033
File Encoding : 65001
Date: 26/10/2024 12:34:22
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for allcategory
-- ----------------------------
DROP TABLE IF EXISTS `allcategory`;
CREATE TABLE `allcategory` (
`id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '总类目ID',
`cindex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '总类目索引',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of allcategory
-- ----------------------------
INSERT INTO `allcategory` VALUES (1, '技术教程');
INSERT INTO `allcategory` VALUES (2, 'bug解决');
INSERT INTO `allcategory` VALUES (3, '划水交流');
INSERT INTO `allcategory` VALUES (4, '新闻天地');
-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
`id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
`title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文章标题',
`content` varchar(10000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文章内容',
`cover_img` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文章封面',
`state` enum('已发布','草稿') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '草稿' COMMENT '文章状态: 只能是[已发布] 或者 [草稿]',
`category_id` int UNSIGNED NULL DEFAULT NULL COMMENT '文章分类ID',
`create_user` int UNSIGNED NOT NULL COMMENT '创建人ID',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`allcategory_id` int UNSIGNED NOT NULL COMMENT '总分类ID',
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_article_category`(`category_id` ASC) USING BTREE,
INDEX `fk_article_user`(`create_user` ASC) USING BTREE,
INDEX `fk_article_allcategory`(`allcategory_id` ASC) USING BTREE,
CONSTRAINT `fk_article_allcategory` FOREIGN KEY (`allcategory_id`) REFERENCES `allcategory` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_article_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_article_user` FOREIGN KEY (`create_user`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of article
-- ----------------------------
INSERT INTO `article` VALUES (1, '测试一下哟', '张学东', 'https://bigeven01.oss-cn-beijing.aliyuncs.com/f369cf5f-886b-49dd-89b4-221a66eef9e8.png', '已发布', 1, 1, '2024-10-26 12:20:54', '2024-10-26 12:20:59', 1);
INSERT INTO `article` VALUES (2, 'asdfasdadas', 'sdas sddsadasd\n', 'https://bigeven01.oss-cn-beijing.aliyuncs.com/36172b26-f1a0-4359-b238-54e22cd7c81d.png', '已发布', 1, 2, '2024-10-26 04:26:33', '2024-10-26 04:26:33', 1);
INSERT INTO `article` VALUES (3, 'hahha', 'sdads\n', 'https://bigeven01.oss-cn-beijing.aliyuncs.com/3bd99744-5f17-4a9b-9de9-da316261e5c2.png', '已发布', 4, 2, '2024-10-26 04:33:05', '2024-10-26 04:33:05', 4);
-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '二级类目ID',
`category_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '类目名称',
`all_category_id` int UNSIGNED NOT NULL COMMENT '关联的总类目ID',
PRIMARY KEY (`id`) USING BTREE,
INDEX `all_category_id`(`all_category_id` ASC) USING BTREE,
CONSTRAINT `category_ibfk_1` FOREIGN KEY (`all_category_id`) REFERENCES `allcategory` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of category
-- ----------------------------
INSERT INTO `category` VALUES (1, '编程教学', 1);
INSERT INTO `category` VALUES (2, '牛马测试', 2);
INSERT INTO `category` VALUES (3, '苦逼开发', 3);
INSERT INTO `category` VALUES (4, '外卖咨询', 4);
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
`username` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名',
`password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '密码',
`nickname` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '昵称',
`email` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '邮箱',
`user_pic` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '头像',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `username`(`username` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, 'admin1', 'e10adc3949ba59abbe56e057f20f883e', '', '', '', '2024-10-26 11:42:01', '2024-10-26 11:42:01');
INSERT INTO `user` VALUES (2, 'admin', 'e10adc3949ba59abbe56e057f20f883e', '瑟瑟发抖', 'shibaizhelianmeng@163.com', 'https://bigeven01.oss-cn-beijing.aliyuncs.com/f369cf5f-886b-49dd-89b4-221a66eef9e8.png', '2024-10-26 11:43:07', '2024-10-26 03:48:31');
SET FOREIGN_KEY_CHECKS = 1;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。