/*
Navicat MySQL Data Transfer

Source Server         : mysql
Source Server Version : 50553
Source Host           : localhost:3306
Source Database       : cake

Target Server Type    : MYSQL
Target Server Version : 50553
File Encoding         : 65001

Date: 2022-08-20 13:14:02
*/
SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `aid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `pwd` varchar(255) DEFAULT NULL,
  `regdate` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '注册日期',
  PRIMARY KEY (`aid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='管理员表';

-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES ('1', 'admin', 'D8EF38307B436B25F07A00DFFC8E6B6C', '2022-08-13 01:27:07');

-- ----------------------------
-- Table structure for carousel
-- ----------------------------
DROP TABLE IF EXISTS `carousel`;
CREATE TABLE `carousel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phrase` varchar(255) DEFAULT NULL COMMENT '短语',
  `title` varchar(255) DEFAULT NULL,
  `direction` varchar(255) DEFAULT NULL COMMENT '说明',
  `pic` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='轮播广告';

-- ----------------------------
-- Records of carousel
-- ----------------------------
INSERT INTO `carousel` VALUES ('1', '传统手艺', '美味时刻', '你不吃咱都得挨饿', 'blog-1.jpg');
INSERT INTO `carousel` VALUES ('2', '精心制作', '美食美客', '不负味蕾不负亲', 'blog-2.jpg');
INSERT INTO `carousel` VALUES ('3', '用魅力放倒女人 用酒量放倒男人', '这里征服的', '胃仅仅是个开始', 'blog-3.jpg');

-- ----------------------------
-- Table structure for consumer
-- ----------------------------
DROP TABLE IF EXISTS `consumer`;
CREATE TABLE `consumer` (
  `id` int(11) NOT NULL,
  `username` varchar(30) DEFAULT NULL,
  `userpwd` varchar(30) DEFAULT NULL,
  `openid` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户表';

-- ----------------------------
-- Records of consumer
-- ----------------------------

-- ----------------------------
-- Table structure for discount
-- ----------------------------
DROP TABLE IF EXISTS `discount`;
CREATE TABLE `discount` (
  `did` int(11) NOT NULL AUTO_INCREMENT,
  `pid` int(11) DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL COMMENT '优惠价格',
  PRIMARY KEY (`did`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='优惠表';

-- ----------------------------
-- Records of discount
-- ----------------------------

-- ----------------------------
-- Table structure for mainlist
-- ----------------------------
DROP TABLE IF EXISTS `mainlist`;
CREATE TABLE `mainlist` (
  `oid` varchar(50) NOT NULL,
  `totalqua` int(11) DEFAULT NULL COMMENT '总数量',
  `totalprice` decimal(10,2) DEFAULT NULL COMMENT '总价格',
  `phone` varchar(255) DEFAULT NULL COMMENT '电话',
  `address` varchar(255) DEFAULT NULL COMMENT '地址',
  `notes` varchar(255) DEFAULT NULL COMMENT '备注',
  `statu` varchar(20) DEFAULT NULL COMMENT '支付状态',
  `express` varchar(50) DEFAULT NULL COMMENT '发货状态',
  `actualpay` decimal(10,2) DEFAULT NULL COMMENT '实际支付(回调通知)',
  `purchasedate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`oid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='订单主表';

-- ----------------------------
-- Records of mainlist
-- ----------------------------
INSERT INTO `mainlist` VALUES ('1234560', '3', '36.09', '13547771191', 'shichan', '订单一', '已支付', '已完成', null, '2022-07-11 19:42:45');
INSERT INTO `mainlist` VALUES ('12345602', '3', '30.00', '13547771191', 'shichan', '订单一', '待支付', '待发货', null, '2022-08-15 19:43:33');
INSERT INTO `mainlist` VALUES ('1234561', '9', '30.00', '13547771192', 'shichan', '订单二', '已支付', '已完成', null, '2022-08-11 19:42:56');
INSERT INTO `mainlist` VALUES ('1234563', '9', '30.00', '13547771191', 'shichan', '订单二', '待支付', '待发货', null, '2022-08-15 19:43:33');

-- ----------------------------
-- Table structure for merinfo
-- ----------------------------
DROP TABLE IF EXISTS `merinfo`;
CREATE TABLE `merinfo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `merchant` varchar(50) DEFAULT NULL COMMENT '商家',
  `phone` varchar(30) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商户信息';

-- ----------------------------
-- Records of merinfo
-- ----------------------------
INSERT INTO `merinfo` VALUES ('1', '声色视觉', '后台设置联系方式', '后台设置商家地址');

-- ----------------------------
-- Table structure for message
-- ----------------------------
DROP TABLE IF EXISTS `message`;
CREATE TABLE `message` (
  `lid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) DEFAULT NULL COMMENT '姓名',
  `phone` varchar(11) DEFAULT NULL COMMENT '手机',
  `msg` varchar(255) DEFAULT NULL,
  `isread` tinyint(1) unsigned DEFAULT '0' COMMENT ' 是否已读',
  `postdate` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '提交时间',
  PRIMARY KEY (`lid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='顾客留言';

-- ----------------------------
-- Records of message
-- ----------------------------
INSERT INTO `message` VALUES ('1', '铁蛋', '1354749126', '订购生日蛋糕，10寸，后天要。', '1', '2022-08-17 20:26:09');
INSERT INTO `message` VALUES ('2', '铁锤', '1364797962', '订购结婚蛋糕', '1', '2022-08-17 22:55:42');
INSERT INTO `message` VALUES ('3', 'k3man', '13547771191', '切糕！要大的。', '1', '2022-08-18 14:57:11');

-- ----------------------------
-- Table structure for orderlist
-- ----------------------------
DROP TABLE IF EXISTS `orderlist`;
CREATE TABLE `orderlist` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `oid` varchar(50) NOT NULL COMMENT '订单号',
  `pid` int(11) DEFAULT NULL COMMENT '商品ID',
  `quant` int(255) NOT NULL COMMENT '数量',
  `price` decimal(10,2) DEFAULT NULL COMMENT '价格',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `pid` (`pid`) USING BTREE,
  KEY `oid` (`oid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=209 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单详情表';

-- ----------------------------
-- Records of orderlist
-- ----------------------------
INSERT INTO `orderlist` VALUES ('197', '1234560', '3', '11', '11.28');
INSERT INTO `orderlist` VALUES ('198', '1234560', '2', '12', '3.67');
INSERT INTO `orderlist` VALUES ('199', '1234560', '1', '13', '3.13');
INSERT INTO `orderlist` VALUES ('200', '1234561', '1', '14', '3.13');
INSERT INTO `orderlist` VALUES ('201', '1234561', '1', '15', '3.13');
INSERT INTO `orderlist` VALUES ('202', '1234561', '1', '16', '3.13');
INSERT INTO `orderlist` VALUES ('203', '1234562', '3', '33', '11.28');
INSERT INTO `orderlist` VALUES ('204', '1234562', '2', '33', '3.67');
INSERT INTO `orderlist` VALUES ('205', '1234562', '1', '33', '3.13');
INSERT INTO `orderlist` VALUES ('206', '1234563', '1', '33', '3.13');
INSERT INTO `orderlist` VALUES ('207', '1234563', '1', '33', '3.13');
INSERT INTO `orderlist` VALUES ('208', '1234563', '1', '33', '3.13');

-- ----------------------------
-- Table structure for putlist
-- ----------------------------
DROP TABLE IF EXISTS `putlist`;
CREATE TABLE `putlist` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product` varchar(255) DEFAULT NULL COMMENT '产品名称',
  `model` varchar(30) DEFAULT NULL COMMENT '产品规格',
  `price` decimal(10,2) DEFAULT NULL COMMENT '单价',
  `picture` varchar(100) DEFAULT NULL COMMENT '产品图片',
  `issale` tinyint(1) DEFAULT '1' COMMENT ' 是否在售',
  `Putdate` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上架时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='产品表';

-- ----------------------------
-- Records of putlist
-- ----------------------------
INSERT INTO `putlist` VALUES ('1', '白云蛋糕', '8寸', '65.00', '02.png', '1', '2022-05-02 12:55:38');
INSERT INTO `putlist` VALUES ('2', '定制生日蛋糕', '大中小号￥198.00起', '198.00', '220816231246.png', '1', '2022-08-04 15:35:44');
INSERT INTO `putlist` VALUES ('3', '水果蛋糕', '12寸', '68.00', '220816230933.png', '1', '2022-08-04 15:35:44');
INSERT INTO `putlist` VALUES ('4', '葡萄奶盖', '1/2 寸', '30.00', '220817092223.jpeg', '1', '2022-08-04 15:35:46');
INSERT INTO `putlist` VALUES ('5', '红丝绒蛋糕', '1/3寸', '22.00', '220817092530.jpeg', '1', '2022-08-09 16:44:37');
INSERT INTO `putlist` VALUES ('6', '抹茶蛋糕', '1寸', '33.00', '220817092704.jpeg', '1', '2022-08-09 16:48:52');
INSERT INTO `putlist` VALUES ('7', '无花果蛋糕', '盒', '75.00', '220817092852.jpeg', '0', '2022-08-09 17:03:20');
INSERT INTO `putlist` VALUES ('8', '提拉米苏', '份', '18.00', '220817093020.jpeg', '1', '2022-08-09 17:32:48');
INSERT INTO `putlist` VALUES ('9', '草莓蛋糕', '盒', '35.00', '220817093526.jpeg', '1', '2022-08-09 17:34:14');
INSERT INTO `putlist` VALUES ('10', '巧克力三角蛋糕', '30g', '8.50', '220817094059.jpeg', '1', '2022-08-09 17:34:46');
INSERT INTO `putlist` VALUES ('11', '婚礼蛋糕', '5寸', '128.00', '220817094409.jpeg', '1', '2022-08-09 19:25:12');
INSERT INTO `putlist` VALUES ('12', '紫薯切块蛋糕', '块', '3.30', '220817094544.jpeg', '1', '2022-08-13 09:50:22');
INSERT INTO `putlist` VALUES ('13', '椰奶冻蛋糕', '盒', '67.00', '220817094752.jpeg', '1', '2022-08-15 18:40:27');
INSERT INTO `putlist` VALUES ('14', '戚风蛋糕', '份', '16.00', '220817095008.jpeg', '1', '2022-08-15 18:40:52');
INSERT INTO `putlist` VALUES ('15', '人工空调', '手摇式', '1.00', '22818174733740.jpg', '0', '2022-08-18 17:47:33');
