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/adoptanimal.sql

52 lines
2.2 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:00
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for adoptanimal
-- ----------------------------
DROP TABLE IF EXISTS `adoptanimal`;
CREATE TABLE `adoptanimal` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL COMMENT '用户表id的外键',
`petId` int(11) NOT NULL COMMENT '宠物表id的外键',
`adoptTime` date NOT NULL,
`state` int(11) DEFAULT '1' COMMENT '是否同意被领养 0 是不同意 1 还在审核 2 是同意',
PRIMARY KEY (`id`) USING BTREE,
KEY `fk3` (`userId`) USING BTREE,
KEY `fk4` (`petId`) USING BTREE,
CONSTRAINT `fk3` FOREIGN KEY (`userId`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk4` FOREIGN KEY (`petId`) REFERENCES `pet` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- ----------------------------
-- Records of adoptanimal
-- ----------------------------
INSERT INTO `adoptanimal` VALUES ('1', '1', '1', '2019-08-21', '2');
INSERT INTO `adoptanimal` VALUES ('2', '5', '2', '2019-08-20', '0');
INSERT INTO `adoptanimal` VALUES ('3', '3', '3', '2019-08-19', '1');
INSERT INTO `adoptanimal` VALUES ('4', '4', '4', '2019-08-18', '0');
INSERT INTO `adoptanimal` VALUES ('5', '2', '5', '2019-08-17', '0');
INSERT INTO `adoptanimal` VALUES ('6', '6', '6', '2019-08-16', '1');
INSERT INTO `adoptanimal` VALUES ('7', '1', '5', '2019-09-01', '0');
INSERT INTO `adoptanimal` VALUES ('8', '4', '5', '2019-09-09', '0');
INSERT INTO `adoptanimal` VALUES ('9', '4', '2', '2019-09-09', '0');
INSERT INTO `adoptanimal` VALUES ('10', '5', '2', '2019-09-09', '0');
INSERT INTO `adoptanimal` VALUES ('11', '8', '1', '2023-12-14', '2');
INSERT INTO `adoptanimal` VALUES ('12', '3', '2', '2024-01-04', '2');
INSERT INTO `adoptanimal` VALUES ('13', '5', '2', '2024-01-04', '2');
INSERT INTO `adoptanimal` VALUES ('21', '37', '3', '2024-01-04', '1');