/*
 Navicat Premium Data Transfer

 Source Server         : test
 Source Server Type    : MySQL
 Source Server Version : 50727
 Source Host           : localhost:3306
 Source Schema         : orange

 Target Server Type    : MySQL
 Target Server Version : 50727
 File Encoding         : 65001

 Date: 11/01/2020 16:53:36
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for orange_message
-- ----------------------------
DROP TABLE IF EXISTS `orange_message`;
CREATE TABLE `orange_message`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `send_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `used` enum('YES','NO') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'NO',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of orange_message
-- ----------------------------
INSERT INTO `orange_message` VALUES (1, '测试新消息', '2019-12-16 10:36:28', 'YES');
INSERT INTO `orange_message` VALUES (2, '添加一条新消息测试', '2019-12-17 15:33:27', 'YES');
INSERT INTO `orange_message` VALUES (3, '测试退出消息', '2019-12-17 15:34:32', 'YES');
INSERT INTO `orange_message` VALUES (4, '再次测试', '2019-12-17 15:35:38', 'YES');
INSERT INTO `orange_message` VALUES (5, '今天天气真好', '2019-12-17 15:39:20', 'YES');
INSERT INTO `orange_message` VALUES (6, '今天好热啊', '2019-12-17 17:24:13', 'YES');
INSERT INTO `orange_message` VALUES (7, '今天出太阳了，天气很好', '2019-12-25 17:29:28', 'YES');

-- ----------------------------
-- Table structure for orange_product
-- ----------------------------
DROP TABLE IF EXISTS `orange_product`;
CREATE TABLE `orange_product`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '商品名字',
  `img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '商品图片地址',
  `price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '商品价格',
  `add_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '商品上市时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of orange_product
-- ----------------------------
INSERT INTO `orange_product` VALUES (1, '康乃馨', 'http://192.168.43.15:8081/uploaded/canation.png', 19.90, '2019-12-16 15:58:05');
INSERT INTO `orange_product` VALUES (2, '菊花', 'http://192.168.43.15:8081/uploaded/ju.png', 9.99, '2019-12-16 18:19:09');
INSERT INTO `orange_product` VALUES (3, '茉莉', 'http://192.168.43.15:8081/uploaded/moli.png', 22.00, '2019-12-17 02:29:50');
INSERT INTO `orange_product` VALUES (4, '粉玫瑰', 'http://192.168.43.15:8081/uploaded/pinkrose.png', 31.00, '2019-12-17 02:38:29');
INSERT INTO `orange_product` VALUES (5, '红玫瑰', 'http://192.168.43.15:8081/uploaded/redrose.png', 23.00, '2019-12-17 02:38:29');
INSERT INTO `orange_product` VALUES (6, '水仙', 'http://192.168.43.15:8081/uploaded/flower.jpg', 33.00, '2019-12-17 02:38:29');
INSERT INTO `orange_product` VALUES (7, '向日葵', 'http://192.168.43.15:8081/uploaded/sunflower.png', 13.00, '2019-12-17 02:38:29');
INSERT INTO `orange_product` VALUES (8, '郁金香', 'http://192.168.43.15:8081/uploaded/tulipa.jpg', 16.00, '2019-12-17 02:38:29');
-- ----------------------------
-- Table structure for orange_sale
-- ----------------------------
DROP TABLE IF EXISTS `orange_sale`;
CREATE TABLE `orange_sale`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL DEFAULT 0,
  `sales_num` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for orange_shoppingcart
-- ----------------------------
DROP TABLE IF EXISTS `orange_shoppingcart`;
CREATE TABLE `orange_shoppingcart`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `user_id` int(11) NOT NULL DEFAULT 0 COMMENT '用户id',
  `product_id` int(11) NOT NULL DEFAULT 0 COMMENT '商品id',
  `num` int(11) NOT NULL DEFAULT 0 COMMENT '数量',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for orange_user
-- ----------------------------
DROP TABLE IF EXISTS `orange_user`;
CREATE TABLE `orange_user`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `sex` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `city` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of orange_user
-- ----------------------------
INSERT INTO `orange_user` VALUES (1, '123', '123321', '男', '江西省 赣州市 章贡区');
INSERT INTO `orange_user` VALUES (2, 'xiaoming', '123456', '女', '江西省 赣州市 章贡区');
INSERT INTO `orange_user` VALUES (3, 'xiaoliang', '123456', '女', '江西省 赣州市 章贡区');
INSERT INTO `orange_user` VALUES (4, 'zsss', '123456', '女', '江西省 赣州市 章贡区');
INSERT INTO `orange_user` VALUES (5, 'xiaowang', '12345678', '男', '江西省 赣州市 章贡区');

SET FOREIGN_KEY_CHECKS = 1;
