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.
201 lines
8.8 KiB
201 lines
8.8 KiB
/*
|
|
Navicat Premium Data Transfer
|
|
|
|
Source Server : springtest
|
|
Source Server Type : MySQL
|
|
Source Server Version : 80030
|
|
Source Host : localhost:3306
|
|
Source Schema : productdata
|
|
|
|
Target Server Type : MySQL
|
|
Target Server Version : 80030
|
|
File Encoding : 65001
|
|
|
|
Date: 22/12/2023 17:12:39
|
|
*/
|
|
|
|
SET NAMES utf8mb4;
|
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for ausertable
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `ausertable`;
|
|
CREATE TABLE `ausertable` (
|
|
`id` int(0) NOT NULL AUTO_INCREMENT,
|
|
`aname` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
|
`apwd` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Records of ausertable
|
|
-- ----------------------------
|
|
INSERT INTO `ausertable` VALUES (1, 'admin', 'admin');
|
|
INSERT INTO `ausertable` VALUES (2, '杨松林', '123456');
|
|
|
|
-- ----------------------------
|
|
-- Table structure for busertable
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `busertable`;
|
|
CREATE TABLE `busertable` (
|
|
`id` int(0) NOT NULL AUTO_INCREMENT,
|
|
`bemail` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
|
`bpwd` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Records of busertable
|
|
-- ----------------------------
|
|
INSERT INTO `busertable` VALUES (1, 'songlin@qq.com', '78f8a7ae700c91db09facb05a675432b');
|
|
INSERT INTO `busertable` VALUES (2, 'admin@qq.com', '78f8a7ae700c91db09facb05a675432b');
|
|
|
|
-- ----------------------------
|
|
-- Table structure for carttable
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `carttable`;
|
|
CREATE TABLE `carttable` (
|
|
`id` int(0) NOT NULL AUTO_INCREMENT,
|
|
`busertable_id` int(0) NOT NULL,
|
|
`goodstable_id` int(0) NOT NULL,
|
|
`shoppingnum` int(0) NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `bid`(`busertable_id`) USING BTREE,
|
|
INDEX `gno`(`goodstable_id`) USING BTREE,
|
|
CONSTRAINT `bid` FOREIGN KEY (`busertable_id`) REFERENCES `busertable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
|
|
CONSTRAINT `gno` FOREIGN KEY (`goodstable_id`) REFERENCES `goodstable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Records of carttable
|
|
-- ----------------------------
|
|
INSERT INTO `carttable` VALUES (3, 2, 14, 2);
|
|
INSERT INTO `carttable` VALUES (4, 2, 10, 1);
|
|
|
|
-- ----------------------------
|
|
-- Table structure for focustable
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `focustable`;
|
|
CREATE TABLE `focustable` (
|
|
`id` int(0) NOT NULL AUTO_INCREMENT,
|
|
`goodstable_id` int(0) NOT NULL,
|
|
`busertable_id` int(0) NOT NULL,
|
|
`focustime` datetime(0) DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `gno1`(`goodstable_id`) USING BTREE,
|
|
INDEX `bid1`(`busertable_id`) USING BTREE,
|
|
CONSTRAINT `bid1` FOREIGN KEY (`busertable_id`) REFERENCES `busertable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
|
|
CONSTRAINT `gno1` FOREIGN KEY (`goodstable_id`) REFERENCES `goodstable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Records of focustable
|
|
-- ----------------------------
|
|
INSERT INTO `focustable` VALUES (1, 14, 2, '2023-12-22 17:10:00');
|
|
INSERT INTO `focustable` VALUES (2, 10, 2, '2023-12-22 17:10:04');
|
|
INSERT INTO `focustable` VALUES (3, 12, 2, '2023-12-22 17:10:06');
|
|
INSERT INTO `focustable` VALUES (4, 9, 2, '2023-12-22 17:10:08');
|
|
INSERT INTO `focustable` VALUES (5, 8, 2, '2023-12-22 17:10:16');
|
|
INSERT INTO `focustable` VALUES (6, 6, 2, '2023-12-22 17:10:19');
|
|
INSERT INTO `focustable` VALUES (7, 4, 2, '2023-12-22 17:10:23');
|
|
|
|
-- ----------------------------
|
|
-- Table structure for goodstable
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `goodstable`;
|
|
CREATE TABLE `goodstable` (
|
|
`id` int(0) NOT NULL AUTO_INCREMENT,
|
|
`gname` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
|
|
`goprice` double DEFAULT NULL,
|
|
`grprice` double DEFAULT NULL,
|
|
`gstore` int(0) DEFAULT NULL,
|
|
`gpicture` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
|
|
`isRecommend` tinyint(0) DEFAULT NULL,
|
|
`isAdvertisement` tinyint(0) DEFAULT NULL,
|
|
`goodstype_id` int(0) DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `typeid`(`goodstype_id`) USING BTREE,
|
|
CONSTRAINT `typeid` FOREIGN KEY (`goodstype_id`) REFERENCES `goodstype` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Records of goodstable
|
|
-- ----------------------------
|
|
INSERT INTO `goodstable` VALUES (1, '广告1', 1, 1, 1, '广告1.jpg', 0, 1, 1);
|
|
INSERT INTO `goodstable` VALUES (2, '广告2', 1, 1, 1, '广告2.jpg', 0, 1, 1);
|
|
INSERT INTO `goodstable` VALUES (3, '广告3', 1, 1, 1, '广告3.jpg', 0, 1, 1);
|
|
INSERT INTO `goodstable` VALUES (4, '二手衣物', 90, 60, 30, '二手衣物.jpg', 1, 0, 3);
|
|
INSERT INTO `goodstable` VALUES (5, '二手休闲鞋', 1000, 600, 20, '二手休闲鞋.jpg', 1, 0, 4);
|
|
INSERT INTO `goodstable` VALUES (6, '二手文具', 60, 30, 100, '二手文具.jpg', 1, 0, 5);
|
|
INSERT INTO `goodstable` VALUES (8, '吹风机', 100, 60, 30, '吹风机.jpg', 1, 0, 2);
|
|
INSERT INTO `goodstable` VALUES (9, '二手帽子', 90, 60, 29, '二手帽子.jpg', 1, 0, 2);
|
|
INSERT INTO `goodstable` VALUES (10, '二手书', 200, 100, 60, '二手书.jpg', 1, 0, 5);
|
|
INSERT INTO `goodstable` VALUES (11, '二手洗衣机', 6000, 2000, 6, '二手洗衣机.jpg', 1, 0, 2);
|
|
INSERT INTO `goodstable` VALUES (12, '二手鞋架', 50, 20, 30, '二手鞋架.jpg', 1, 0, 2);
|
|
INSERT INTO `goodstable` VALUES (13, '二手衣架', 50, 10, 88, '二手衣架.jpg', 1, 0, 2);
|
|
INSERT INTO `goodstable` VALUES (14, '二手书包', 200, 90, 60, '二手书包.jpg', 1, 0, 5);
|
|
|
|
-- ----------------------------
|
|
-- Table structure for goodstype
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `goodstype`;
|
|
CREATE TABLE `goodstype` (
|
|
`id` int(0) NOT NULL AUTO_INCREMENT,
|
|
`typename` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Records of goodstype
|
|
-- ----------------------------
|
|
INSERT INTO `goodstype` VALUES (1, '广告');
|
|
INSERT INTO `goodstype` VALUES (2, '生活用品');
|
|
INSERT INTO `goodstype` VALUES (3, '衣服');
|
|
INSERT INTO `goodstype` VALUES (4, '鞋子');
|
|
INSERT INTO `goodstype` VALUES (5, '学习用品');
|
|
|
|
-- ----------------------------
|
|
-- Table structure for orderbasetable
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `orderbasetable`;
|
|
CREATE TABLE `orderbasetable` (
|
|
`id` int(0) NOT NULL AUTO_INCREMENT,
|
|
`busertable_id` int(0) NOT NULL,
|
|
`amount` double NOT NULL,
|
|
`status` tinyint(0) NOT NULL,
|
|
`orderdate` datetime(0) NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `bid2`(`busertable_id`) USING BTREE,
|
|
CONSTRAINT `bid2` FOREIGN KEY (`busertable_id`) REFERENCES `busertable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Records of orderbasetable
|
|
-- ----------------------------
|
|
INSERT INTO `orderbasetable` VALUES (1, 2, 80, 1, '2023-12-22 17:10:49');
|
|
|
|
-- ----------------------------
|
|
-- Table structure for orderdetail
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `orderdetail`;
|
|
CREATE TABLE `orderdetail` (
|
|
`id` int(0) NOT NULL AUTO_INCREMENT,
|
|
`orderbasetable_id` int(0) NOT NULL,
|
|
`goodstable_id` int(0) NOT NULL,
|
|
`shoppingnum` int(0) NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `odsn`(`orderbasetable_id`) USING BTREE,
|
|
INDEX `gno3`(`goodstable_id`) USING BTREE,
|
|
CONSTRAINT `gno3` FOREIGN KEY (`goodstable_id`) REFERENCES `goodstable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
|
|
CONSTRAINT `odsn` FOREIGN KEY (`orderbasetable_id`) REFERENCES `orderbasetable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Records of orderdetail
|
|
-- ----------------------------
|
|
INSERT INTO `orderdetail` VALUES (1, 1, 13, 2);
|
|
INSERT INTO `orderdetail` VALUES (2, 1, 9, 1);
|
|
|
|
SET FOREIGN_KEY_CHECKS = 1;
|