/*
Navicat MySQL Data Transfer
Source Server : long
Source Server Version : 50637
Source Host : localhost:3306
Source Database : robot
Target Server Type : MYSQL
Target Server Version : 50637
File Encoding : 65001
Date: 2018-01-05 15:09:55
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `address`
-- ----------------------------
DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT NULL,
`tel` varchar(11) COLLATE utf8_bin DEFAULT NULL,
`linkman` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`email` varchar(30) COLLATE utf8_bin DEFAULT NULL,
`addr` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`flag` int(11) DEFAULT '0',
`oid` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK_Reference_1` (`uid`),
KEY `oid` (`oid`),
CONSTRAINT `FK_Reference_1` FOREIGN KEY (`uid`) REFERENCES `user` (`id`),
CONSTRAINT `address_ibfk_1` FOREIGN KEY (`oid`) REFERENCES `orders` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of address
-- ----------------------------
INSERT INTO `address` VALUES ('1', '3', '151131', '李四娃', null, '上海', '0', '1');
INSERT INTO `address` VALUES ('2', '3', '151131', '李四娃', null, '上海', '0', '2');
INSERT INTO `address` VALUES ('3', '3', '151131', '李四娃', null, '上海', '0', '3');
INSERT INTO `address` VALUES ('4', '3', '151131', '李四娃', null, '上海', '0', '4');
INSERT INTO `address` VALUES ('5', '3', '151131', '李四娃', null, '上海', '0', '5');
INSERT INTO `address` VALUES ('6', '7', '91919191', '哇哇哇', null, '欧罗斯', '0', '6');
INSERT INTO `address` VALUES ('7', '7', '91919191', '哇哇哇', null, '欧罗斯', '0', '7');
INSERT INTO `address` VALUES ('8', '8', '13354789587', '赵信', null, '成都市高新区', '0', '8');
INSERT INTO `address` VALUES ('9', '8', '13354789587', '赵信', null, '成都市高新区', '0', '9');
INSERT INTO `address` VALUES ('10', '9', '1', 'bei', null, '1', '0', '10');
INSERT INTO `address` VALUES ('11', '9', '1', 'bei', null, '1', '0', '11');
-- ----------------------------
-- Table structure for `goods`
-- ----------------------------
DROP TABLE IF EXISTS `goods`;
CREATE TABLE `goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tid` int(11) DEFAULT NULL,
`gname` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`des` varchar(200) COLLATE utf8_bin DEFAULT NULL,
`price` decimal(9,2) DEFAULT NULL,
`flag` int(11) DEFAULT '0',
`link` varchar(50) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK_Reference_5` (`tid`),
CONSTRAINT `FK_Reference_5` FOREIGN KEY (`tid`) REFERENCES `type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of goods
-- ----------------------------
INSERT INTO `goods` VALUES ('1', '4', '双胞胎', '双人同时战斗,火力强', '22220.00', '0', './img/war/i.jpg');
INSERT INTO `goods` VALUES ('2', '4', '星际战神', '外形酷,穿梭星际', '333330.00', '0', './img/war/j.jpg');
INSERT INTO `goods` VALUES ('3', '4', '电死你不偿命', '电磁机器人,电气设施破坏者', '44440.00', '0', './img/war/t.jpg');
INSERT INTO `goods` VALUES ('4', '4', '子弹雨', '火力强大', '55550.00', '0', './img/war/m.jpg');
INSERT INTO `goods` VALUES ('5', '4', 'F4', '机器人组合,杀人放火样样行', '666666.00', '0', './img/war/n.jpg');
INSERT INTO `goods` VALUES ('6', '4', '激光机器人', '激光武器', '800000.00', '0', './img/war/u.jpg');
INSERT INTO `goods` VALUES ('7', '3', '胡须爷爷', '超级飞侠', '100.00', '0', './img/toy/4.jpg');
INSERT INTO `goods` VALUES ('8', '3', '变形金刚', '变形', '200.00', '0', './img/toy/3.jpg');
INSERT INTO `goods` VALUES ('9', '1', '安全卫士', '安全', '50000.00', '0', './img/general/f.jpg');
INSERT INTO `goods` VALUES ('10', '1', '足球小子', '踢足球', '11110.00', '0', './img/general/a.jpg');
INSERT INTO `goods` VALUES ('11', '2', '群魔乱舞', '电子产品机械手', '188880.00', '0', './img/industry/1.jpg');
INSERT INTO `goods` VALUES ('12', '4', '指哪打哪', '人工控制', '1999999.00', '0', './img/war/l.jpg');
INSERT INTO `goods` VALUES ('13', '3', '蓝色boy', '小孩喜欢', '110.00', '0', './img/toy/1.jpg');
INSERT INTO `goods` VALUES ('14', '4', '外星人', '外星人', '500000.00', '0', './img/war/w.jpg');
INSERT INTO `goods` VALUES ('15', '3', 'RED火箭', '外形酷,人人喜欢', '150.00', '0', './img/toy/2.jpg');
-- ----------------------------
-- Table structure for `orders`
-- ----------------------------
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT NULL,
`gid` int(11) DEFAULT NULL,
`ordernum` int(11) DEFAULT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`flag` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `FK_Reference_7` (`gid`),
KEY `FK_Reference_10` (`uid`),
CONSTRAINT `FK_Reference_6` FOREIGN KEY (`uid`) REFERENCES `user` (`id`),
CONSTRAINT `FK_Reference_7` FOREIGN KEY (`gid`) REFERENCES `goods` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of orders
-- ----------------------------
INSERT INTO `orders` VALUES ('1', '3', '14', null, '2017-12-08 22:50:44', '0');
INSERT INTO `orders` VALUES ('2', '3', '6', null, '2017-12-08 22:54:25', '0');
INSERT INTO `orders` VALUES ('3', '3', '7', null, '2017-12-10 10:01:45', '0');
INSERT INTO `orders` VALUES ('4', '3', '13', null, '2017-12-10 10:01:45', '0');
INSERT INTO `orders` VALUES ('5', '3', '8', null, '2017-12-10 20:53:32', '0');
INSERT INTO `orders` VALUES ('6', '7', '7', null, '2017-12-10 22:06:31', '0');
INSERT INTO `orders` VALUES ('7', '7', '8', null, '2017-12-10 22:06:31', '0');
INSERT INTO `orders` VALUES ('8', '8', '5', null, '2017-12-11 12:04:39', '0');
INSERT INTO `orders` VALUES ('9', '8', '2', null, '2017-12-11 12:10:08', '0');
INSERT INTO `orders` VALUES ('10', '9', '7', null, '2017-12-11 14:48:58', '0');
INSERT INTO `orders` VALUES ('11', '9', '8', null, '2017-12-11 18:10:55', '0');
-- ----------------------------
-- Table structure for `repertory`
-- ----------------------------
DROP TABLE IF EXISTS `repertory`;
CREATE TABLE `repertory` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`gid` int(11) DEFAULT NULL,
`quantities` int(11) DEFAULT '0',
`timestamp` datetime DEFAULT NULL,
`flag` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `FK_Reference_2` (`gid`),
CONSTRAINT `FK_Reference_2` FOREIGN KEY (`gid`) REFERENCES `goods` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of repertory
-- ----------------------------
INSERT INTO `repertory` VALUES ('1', '1', '100', '2017-12-06 11:53:20', '0');
INSERT INTO `repertory` VALUES ('2', '2', '0', '2017-12-06 11:53:58', '0');
INSERT INTO `repertory` VALUES ('3', '3', '0', '2017-12-06 11:54:12', '0');
INSERT INTO `repertory` VALUES ('4', '4', '188', '2017-12-06 11:54:23', '0');
INSERT INTO `repertory` VALUES ('5', '5', '199', '2017-12-06 11:54:35', '0');
INSERT INTO `repertory` VALUES ('6', '6', '493', '2017-12-06 11:55:08', '0');
INSERT INTO `repertory` VALUES ('7', '7', '694', '2017-12-06 11:55:19', '0');
INSERT INTO `repertory` VALUES ('8', '8', '795', '2017-12-06 11:55:31', '0');
INSERT INTO `repertory` VALUES ('9', '9', '89', '2017-12-06 11:55:50', '0');
INSERT INTO `repertory` VALUES ('10', '10', '555', '2017-12-06 11:56:32', '0');
INSERT INTO `repertory` VALUES ('11', '11', '333', '2017-12-06 11:57:35', '0');
INSERT INTO `repertory` VALUES ('12', '12', '666', '2017-12-06 11:57:03', '0');
INSERT