加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cook.sql 7.06 KB
一键复制 编辑 原始数据 按行查看 历史
Amphetamine 提交于 2021-12-22 09:44 . 12/22重新设计,数据库
/*
Navicat Premium Data Transfer
Source Server : root
Source Server Type : MySQL
Source Server Version : 50725
Source Host : localhost:3306
Source Schema : cook
Target Server Type : MySQL
Target Server Version : 50725
File Encoding : 65001
Date: 22/12/2021 09:42:09
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`admin` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`email` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`admin`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES ('admin', 'admin', '1234@qq.com');
-- ----------------------------
-- Table structure for appointment
-- ----------------------------
DROP TABLE IF EXISTS `appointment`;
CREATE TABLE `appointment` (
`orderid` int(5) NOT NULL,
`customerid` int(5) NOT NULL,
`cookid` int(5) NOT NULL,
`time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`orderid`, `customerid`, `cookid`) USING BTREE,
INDEX `orderid`(`orderid`) USING BTREE,
INDEX `customerid`(`customerid`) USING BTREE,
INDEX `cookid`(`cookid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appointment
-- ----------------------------
INSERT INTO `appointment` VALUES (71, 1, 1, '2021-07-07 20:47:59');
-- ----------------------------
-- Table structure for buy
-- ----------------------------
DROP TABLE IF EXISTS `buy`;
CREATE TABLE `buy` (
`foodid` int(5) NOT NULL,
`id` int(5) NOT NULL,
`num` int(5) NULL DEFAULT NULL,
PRIMARY KEY (`foodid`, `id`) USING BTREE,
INDEX `foodid`(`foodid`) USING BTREE,
INDEX `id`(`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cart
-- ----------------------------
DROP TABLE IF EXISTS `cart`;
CREATE TABLE `cart` (
`foodid` int(5) NOT NULL,
`name` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`image` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`price` int(10) NULL DEFAULT NULL,
`count` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`foodid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of cart
-- ----------------------------
INSERT INTO `cart` VALUES (6, '麻辣小龙虾', 'malachaoxie.png', 50, 3);
-- ----------------------------
-- Table structure for deal
-- ----------------------------
DROP TABLE IF EXISTS `deal`;
CREATE TABLE `deal` (
`orderid` int(5) NOT NULL,
`cookid` int(5) NOT NULL,
`foodid` int(5) NOT NULL,
`num` int(5) NULL DEFAULT NULL,
PRIMARY KEY (`orderid`, `cookid`, `foodid`) USING BTREE,
INDEX `orderid`(`orderid`) USING BTREE,
INDEX `cookid`(`cookid`) USING BTREE,
INDEX `foodid`(`foodid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for dishes
-- ----------------------------
DROP TABLE IF EXISTS `dishes`;
CREATE TABLE `dishes` (
`foodid` int(5) NOT NULL,
`name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`image` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`price` int(10) NULL DEFAULT NULL,
`sales` int(10) NULL DEFAULT NULL,
PRIMARY KEY (`foodid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of dishes
-- ----------------------------
INSERT INTO `dishes` VALUES (4, '凉拌饺子', 'jip.png', 25, 50);
INSERT INTO `dishes` VALUES (5, '焗龙虾', 'julongxia.png', 100, 50);
INSERT INTO `dishes` VALUES (6, '麻辣小龙虾', 'malachaoxie.png', 50, 60);
INSERT INTO `dishes` VALUES (7, '奶油乳鸽', 'ruge.png', 40, 60);
INSERT INTO `dishes` VALUES (8, '木瓜奶油', 'xueha.png', 56, 36);
INSERT INTO `dishes` VALUES (9, '凉拌折耳根', 'yuxuangrousi.png', 36, 24);
INSERT INTO `dishes` VALUES (10, '炸龙虾', 'lainiaoxia.png', 35, 24);
-- ----------------------------
-- Table structure for order
-- ----------------------------
DROP TABLE IF EXISTS `order`;
CREATE TABLE `order` (
`customerid` int(5) NOT NULL,
`orderid` int(5) NOT NULL,
`creationtime` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`paymentstatus` int(1) NULL DEFAULT NULL,
`address` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`price` int(10) NULL DEFAULT NULL,
PRIMARY KEY (`customerid`, `orderid`) USING BTREE,
INDEX `customerid`(`customerid`) USING BTREE,
INDEX `cookid`(`orderid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of order
-- ----------------------------
INSERT INTO `order` VALUES (1, 71, '2021-07-07 20:47:44', 1, '惠州学院', 300);
INSERT INTO `order` VALUES (1, 171, '2021-12-17 10:01:16', 1, NULL, NULL);
-- ----------------------------
-- Table structure for raw
-- ----------------------------
DROP TABLE IF EXISTS `raw`;
CREATE TABLE `raw` (
`id` int(5) NOT NULL,
`name` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`num` int(10) NULL DEFAULT NULL,
`price` int(10) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of raw
-- ----------------------------
INSERT INTO `raw` VALUES (1, '小麦', 12, 30);
INSERT INTO `raw` VALUES (2, '番茄', 23, 50);
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`account` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`email` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`role` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`account`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('longchao', '123', '123@qq.com', '18818798367', '顾客');
INSERT INTO `user` VALUES ('xiaowang', '12345678', '412503533@qq.com', '18818798367', '厨师');
INSERT INTO `user` VALUES ('张三', '123', '321@qq.com', '18818788366', '厨师');
SET FOREIGN_KEY_CHECKS = 1;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化