代码拉取完成,页面将自动刷新
/*
SQLyog Ultimate v10.00 Beta1
MySQL - 8.0.27 : Database - baby_food
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`baby_food` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `baby_food`;
/*Table structure for table `announcement` */
DROP TABLE IF EXISTS `announcement`;
CREATE TABLE `announcement` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`imag` varchar(255) DEFAULT NULL COMMENT '公告的图片',
`aid` int DEFAULT NULL COMMENT '公告代表的文章id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb3;
/*Table structure for table `article` */
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '未编写主题',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '内容',
`user` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户名称',
`time` datetime DEFAULT NULL COMMENT '发布时间',
`summary` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '文章概述',
`uid` int NOT NULL COMMENT '作者的id',
`tid` int DEFAULT NULL COMMENT '文章类型的id',
`readnumber` int DEFAULT '10' COMMENT '阅读次数',
`cover` int NOT NULL DEFAULT '0' COMMENT '状态码',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=160 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*Table structure for table `collection` */
DROP TABLE IF EXISTS `collection`;
CREATE TABLE `collection` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`uid` int DEFAULT NULL COMMENT '收藏者id',
`article_id` int DEFAULT NULL COMMENT '被收藏文章ID',
`authorid` int DEFAULT NULL COMMENT '被收藏文章的作者id',
`time` datetime DEFAULT NULL COMMENT '收藏时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb3;
/*Table structure for table `comments` */
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '消息内容',
`uid` int DEFAULT NULL COMMENT '评论人的id',
`time` datetime DEFAULT NULL COMMENT '发送时间',
`pid` int DEFAULT NULL COMMENT '这是父子回复里绑定的父消息id',
`origin_id` int DEFAULT NULL COMMENT '最上级评论',
`fid` int DEFAULT NULL COMMENT '文章的id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb3;
/*Table structure for table `food` */
DROP TABLE IF EXISTS `food`;
CREATE TABLE `food` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`imgurl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '封面',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '食物名称',
`brief` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '简介',
`disease` varchar(255) DEFAULT NULL COMMENT '相对应治疗的疾病',
`good` int DEFAULT '0' COMMENT '点赞数',
`readnumber` int DEFAULT '10' COMMENT '浏览量',
`time` datetime DEFAULT NULL COMMENT '创建时间',
`cover` int DEFAULT '1' COMMENT '用来确认是哪个年龄段的',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb3;
/*Table structure for table `ftype` */
DROP TABLE IF EXISTS `ftype`;
CREATE TABLE `ftype` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
`fid` int DEFAULT NULL COMMENT '所代表的食物cover',
`title` varchar(255) DEFAULT NULL COMMENT 'id所代表的标签',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;
/*Table structure for table `message` */
DROP TABLE IF EXISTS `message`;
CREATE TABLE `message` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '消息内容',
`uid` int DEFAULT NULL COMMENT '评论人的id',
`time` datetime DEFAULT NULL COMMENT '发送时间',
`pid` int DEFAULT NULL COMMENT '这是父子回复里绑定的父消息id',
`origin_id` int DEFAULT NULL COMMENT '最上级评论',
`aid` int DEFAULT NULL COMMENT '文章的id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb3;
/*Table structure for table `type` */
DROP TABLE IF EXISTS `type`;
CREATE TABLE `type` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`tid` int DEFAULT NULL COMMENT '文章对应的tid',
`agetext` varchar(255) DEFAULT NULL COMMENT 'tid年龄段对应的年龄段',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;
/*Table structure for table `user` */
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`avatar` varchar(255) DEFAULT NULL COMMENT '头像',
`username` varchar(50) DEFAULT NULL COMMENT '用户名',
`password` varchar(50) DEFAULT NULL COMMENT '密码',
`nick_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '真实姓名',
`age` int DEFAULT NULL COMMENT '年龄',
`sex` varchar(50) DEFAULT NULL COMMENT '性别',
`phone` varchar(50) DEFAULT NULL COMMENT '联系方式',
`email` varchar(50) DEFAULT NULL COMMENT '邮箱',
`brief` varchar(255) DEFAULT NULL COMMENT '个人简介',
`address` varchar(255) DEFAULT NULL COMMENT '地址',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`cover` int DEFAULT '0' COMMENT '0代表普通用户 1代表管理员',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb3;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。