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.
test1/comment.sql

48 lines
1.8 KiB

/*
Navicat MySQL Data Transfer
Source Server : he
Source Server Version : 50636
Source Host : localhost:3306
Source Database : hlb
Target Server Type : MYSQL
Target Server Version : 50636
File Encoding : 65001
Date: 2024-06-28 13:13:36
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) DEFAULT NULL,
`adminsId` int(11) DEFAULT NULL,
`petId` int(11) DEFAULT NULL,
`commentTime` date NOT NULL,
`content` varchar(200) NOT NULL COMMENT '评论的内容',
PRIMARY KEY (`id`) USING BTREE,
KEY `fk1` (`userId`) USING BTREE,
KEY `fk2` (`petId`) USING BTREE,
KEY `fk5` (`adminsId`) USING BTREE,
CONSTRAINT `fk1` FOREIGN KEY (`userId`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk2` FOREIGN KEY (`petId`) REFERENCES `pet` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk5` FOREIGN KEY (`adminsId`) REFERENCES `admins` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- ----------------------------
-- Records of comment
-- ----------------------------
INSERT INTO `comment` VALUES ('3', '3', null, '1', '2018-08-21', '这不错!');
INSERT INTO `comment` VALUES ('4', '4', null, '2', '2019-08-21', '这不错!');
INSERT INTO `comment` VALUES ('5', '5', null, '2', '2018-08-23', '这不错');
INSERT INTO `comment` VALUES ('6', '6', null, '3', '2019-08-24', '这好看');
INSERT INTO `comment` VALUES ('8', '8', null, '5', '2019-08-25', '这好看');
INSERT INTO `comment` VALUES ('11', '1', null, '5', '2019-08-30', '这好看');
INSERT INTO `comment` VALUES ('12', '1', null, '5', '2019-08-30', '这好看');