/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50540
Source Host : localhost:3306
Source Database : market
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2019-06-16 15:21:01
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for cart
-- ----------------------------
DROP TABLE IF EXISTS `cart`;
CREATE TABLE `cart` (
`cart_id` int(20) NOT NULL AUTO_INCREMENT,
`user_id` int(20) DEFAULT NULL,
`product_id` int(20) DEFAULT NULL,
`product_num` int(20) DEFAULT NULL,
PRIMARY KEY (`cart_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT;
-- ----------------------------
-- Records of cart
-- ----------------------------
-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`comment_id` int(20) NOT NULL AUTO_INCREMENT,
`user_id` int(20) DEFAULT NULL,
`comment_content` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`comment_date` datetime DEFAULT NULL,
`product_id` int(20) DEFAULT NULL,
PRIMARY KEY (`comment_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT;
-- ----------------------------
-- Records of comment
-- ----------------------------
INSERT INTO `comment` VALUES ('1', '1', '真的好用!', '2019-06-07 22:24:37', '1');
INSERT INTO `comment` VALUES ('2', '2', '好用啊!', '2019-06-04 22:24:54', '1');
INSERT INTO `comment` VALUES ('3', '3', '6666666666', '2019-06-06 22:25:07', '1');
INSERT INTO `comment` VALUES ('4', '1', '3213', '2019-06-13 14:45:39', '1');
INSERT INTO `comment` VALUES ('5', '1', '好用', '2019-05-30 13:15:13', '2');
INSERT INTO `comment` VALUES ('6', '2', '777777', '2019-06-16 13:15:34', '2');
INSERT INTO `comment` VALUES ('7', '3', '雷军牛逼', '2019-06-16 13:15:54', '3');
INSERT INTO `comment` VALUES ('8', '2', 'ARE YOU OK!', '2019-06-16 13:16:08', '4');
INSERT INTO `comment` VALUES ('9', '1', 'DO YOU EAT RICE!', '2019-06-16 13:16:38', '5');
INSERT INTO `comment` VALUES ('10', '3', '太好用了啊', '2019-06-16 13:16:56', '6');
-- ----------------------------
-- Table structure for order
-- ----------------------------
DROP TABLE IF EXISTS `order`;
CREATE TABLE `order` (
`order_id` int(20) NOT NULL AUTO_INCREMENT,
`order_downdate` datetime DEFAULT NULL,
`order_price` decimal(10,2) DEFAULT NULL,
`order_state` int(10) DEFAULT NULL,
`order_address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`order_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`order_tel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`post_method` int(10) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
PRIMARY KEY (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT;
-- ----------------------------
-- Records of order
-- ----------------------------
INSERT INTO `order` VALUES ('1', '2019-06-05 18:27:02', '1000.00', '1', '湖北黄冈', 'lzm', '17679210786', '1', '1');
INSERT INTO `order` VALUES ('2', '2019-06-07 14:54:19', '2000.00', '3', '湖北黄冈', 'abc', '1111111111', '1', '1');
INSERT INTO `order` VALUES ('5', '2019-06-12 13:48:24', '7100.00', '3', '浙江省杭州市滨江区22222', '33333', '3333', '1', '1');
INSERT INTO `order` VALUES ('6', '2019-06-12 13:51:05', '3000.00', '4', '浙江省杭州市滨江区4444', '1111', '2223', '1', '1');
INSERT INTO `order` VALUES ('9', '2019-06-12 15:05:06', '2800.00', '2', '浙江省杭州市滨江区444', '222', '333', '1', '1');
INSERT INTO `order` VALUES ('10', '2019-06-13 13:54:38', '3000.00', '2', '浙江省杭州市滨江区44', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('11', '2019-06-13 14:19:49', '19800.00', '2', '浙江省杭州市滨江区44', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('12', '2019-06-13 14:34:06', '3000.00', '3', '浙江省杭州市滨江区444', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('13', '2019-06-13 14:44:15', '1500.00', '3', '浙江省杭州市滨江区444', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('14', '2019-06-13 14:53:33', '20000.00', '4', '浙江省杭州市滨江区444', '222', '333', '1', '1');
INSERT INTO `order` VALUES ('15', '2019-06-14 05:26:24', '4300.00', '4', '浙江省杭州市滨江区44', '22', '33', '1', '13');
INSERT INTO `order` VALUES ('16', '2019-06-14 05:29:52', '4300.00', '4', '浙江省杭州市滨江区44', '22', '33', '1', '12');
INSERT INTO `order` VALUES ('17', '2019-06-14 05:30:13', '1500.00', '1', '浙江省杭州市滨江区44', '22', '33', '1', '12');
INSERT INTO `order` VALUES ('18', '2019-06-14 05:45:11', '5800.00', '1', '浙江省杭州市滨江区44', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('19', '2019-06-14 05:45:12', '5800.00', '1', '浙江省杭州市滨江区44', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('20', '2019-06-14 05:44:14', '5800.00', '0', '浙江省杭州市滨江区44', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('21', '2019-06-14 05:44:17', '5800.00', '0', '浙江省杭州市滨江区44', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('22', '2019-06-14 05:44:20', '5800.00', '0', '浙江省杭州市滨江区44', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('23', '2019-06-14 05:44:18', '5800.00', '0', '浙江省杭州市滨江区44', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('24', '2019-06-14 05:44:12', '5800.00', '0', '浙江省杭州市滨江区44', '22', '33', '1', '1');
INSERT INTO `order` VALUES ('25', '2019-06-14 05:47:16', '20000.00', '0', '浙江省杭州市滨江区44', '22', '22', '1', '1');
INSERT INTO `order` VALUES ('26', '2019-06-14 05:57:01', '5800.00', '0', '浙江省杭州市滨江区44', '22', '33', '1', '1');
-- ----------------------------
-- Table structure for orderitem
-- ----------------------------
DROP TABLE IF EXISTS `orderitem`;
CREATE TABLE `orderitem` (
`orderitem_id` int(20) NOT NULL AUTO_INCREMENT,
`product_id` int(20) DEFAULT NULL,
`product_count` int(20) DEFAULT NULL,
`orderitem_price` decimal(10,2) DEFAULT NULL,
`order_id` int(20) DEFAULT NULL,
PRIMARY KEY (`orderitem_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT;
-- ----------------------------
-- Records of orderitem
-- ----------------------------
INSERT INTO `orderitem` VALUES ('1', '1', '2', '1000.00', '1');
INSERT INTO `orderitem` VALUES ('2', '2', '1', '1400.00', '2');
INSERT INTO `orderitem` VALUES ('3', '2', '2', '1000.00', '1');
INSERT INTO `orderitem` VALUES ('4', '1', '1', '1500.00', '5');
INSERT INTO `orderitem` VALUES ('5', '2', '4', '5600.00', '5');
INSERT INTO `orderitem` VALUES ('6', '3', '3', '3000.00', '6');
INSERT INTO `orderitem` VALUES ('7', '2', '2', '2800.00', '9');
INSERT INTO `orderitem` VALUES ('8', '1', '2', '3000.00', '10');
INSERT INTO `orderitem` VALUES ('9', '2', '2', '2800.00', '11');
INSERT INTO `orderitem` VALUES ('10', '4', '2', '17000.00', '11');
INSERT INTO `orderitem` VALUES ('11', '1', '2', '3000.00', '12');
INSERT INTO `orderitem` VALUES ('12', '1', '1', '1500.00', '13');
INSERT INTO `orderitem` VALUES ('13', '1', '2', '3000.00', '14');
INSERT INTO `orderitem` VALUES ('14', '4', '2', '17000.00', '14');
INSERT INTO `orderitem` VALUES ('15', '1', '1', '1500.00', '15');
INSERT INTO `orderitem` VALUES ('16', '2', '2', '2800.00', '15');
INSERT INTO `orderitem` VALUES ('17', '2', '2', '2800.00', '16');
INSERT INTO `orderitem` VALUES ('18', '1', '1', '1500.00', '16');
INSERT INTO `orderitem` VALUES ('19', '1', '1', '1500.00', '17');
INSERT INTO `orderitem` VALUES ('20', '1', '2', '3000.00', '19');
INSERT INTO `orderitem` VALUES ('