/*
Navicat MySQL Data Transfer
Source Server : 123
Source Server Version : 50558
Source Host : localhost:3306
Source Database : restaurants
Target Server Type : MYSQL
Target Server Version : 50558
File Encoding : 65001
Date: 2017-10-22 20:39:13
*/
SET FOREIGN_KEY_CHECKS=0;
– Table structure for bill
DROP TABLE IF EXISTS bill
;
CREATE TABLE bill
(
id
int(11) NOT NULL AUTO_INCREMENT,
clientid
int(11) DEFAULT NULL,
dishpay
varchar(255) DEFAULT NULL,
satisfaction
varchar(255) DEFAULT NULL,
staff_id
int(255) DEFAULT NULL,
PRIMARY KEY (id
),
KEY fk_bs_01
(staff_id
),
CONSTRAINT fk_bs_01
FOREIGN KEY (staff_id
) REFERENCES staff
(id
)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
– Records of bill
INSERT INTO bill
VALUES (‘1’, ‘1’, ‘298’, ‘非常满意’, ‘7’);
INSERT INTO bill
VALUES (‘2’, ‘2’, ‘338’, ‘满意’, ‘10’);
INSERT INTO bill
VALUES (‘3’, ‘3’, ‘196’, ‘一般’, ‘12’);
INSERT INTO bill
VALUES (‘4’, ‘4’, ‘236’, ‘很差’, ‘9’);
– Table structure for client
DROP TABLE IF EXISTS client
;
CREATE TABLE client
(
id
int(11) NOT NULL AUTO_INCREMENT,
clientid
int(11) DEFAULT NULL,
deskid
int(11) DEFAULT NULL,
datetime
datetime DEFAULT NULL,
menu_id
int(11) DEFAULT NULL,
PRIMARY KEY (id
),
KEY fk-cc-01
(menu_id
),
CONSTRAINT fk-cc-01
FOREIGN KEY (menu_id
) REFERENCES menu
(id
)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
– Records of client
INSERT INTO client
VALUES (‘1’, ‘1’, ‘1’, ‘2017-10-17 17:49:14’, ‘1’);
INSERT INTO client
VALUES (‘2’, ‘1’, ‘1’, ‘2017-10-17 17:49:14’, ‘3’);
INSERT INTO client
VALUES (‘3’, ‘1’, ‘1’, ‘2017-10-17 17:49:14’, ‘8’);
INSERT INTO client
VALUES (‘4’, ‘1’, ‘1’, ‘2017-10-17 17:49:14’, ‘11’);
INSERT INTO client
VALUES (‘5’, ‘1’, ‘1’, ‘2017-10-17 17:49:14’, ‘14’);
INSERT INTO client
VALUES (‘6’, ‘1’, ‘1’, ‘2017-10-17 17:49:14’, ‘17’);
INSERT INTO client
VALUES (‘7’, ‘2’, ‘2’, ‘2017-10-17 17:59:24’, ‘5’);
INSERT INTO client
VALUES (‘8’, ‘2’, ‘2’, ‘2017-10-17 17:59:24’, ‘6’);
INSERT INTO client
VALUES (‘9’, ‘2’, ‘2’, ‘2017-10-17 17:59:24’, ‘8’);
INSERT INTO client
VALUES (‘10’, ‘2’, ‘2’, ‘2017-10-17 17:59:24’, ‘11’);
INSERT INTO client
VALUES (‘11’, ‘2’, ‘2’, ‘2017-10-17 17:59:24’, ‘13’);
INSERT INTO client
VALUES (‘12’, ‘2’, ‘2’, ‘2017-10-17 17:59:24’, ‘14’);
– Table structure for menu
DROP TABLE IF EXISTS menu
;
CREATE TABLE menu
(
id
int(11) NOT NULL AUTO_INCREMENT,
dishid
int(11) DEFAULT NULL,
name
varchar(255) DEFAULT NULL,
price
decimal(10,2) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
– Records of menu
INSERT INTO menu
VALUES (‘1’, ‘1’, ‘梅菜扣肉’, ‘48.00’);
INSERT INTO menu
VALUES (‘2’, ‘2’, ‘酸菜鱼’, ‘68.00’);
INSERT INTO menu
VALUES (‘3’, ‘3’, ‘番茄炒蛋’, ‘18.00’);
INSERT INTO menu
VALUES (‘4’, ‘4’, ‘麻婆豆腐’, ‘12.00’);
INSERT INTO menu
VALUES (‘5’, ‘5’, ‘酸甜排骨’, ‘58.00’);
INSERT INTO menu
VALUES (‘6’, ‘6’, ‘尖椒回锅肉’, ‘38.00’);
INSERT INTO menu
VALUES (‘7’, ‘7’, ‘干锅包菜’, ‘28.00’);
INSERT INTO menu
VALUES (‘8’, ‘8’, ‘干锅花菜’, ‘28.00’);
INSERT INTO menu
VALUES (‘9’, ‘9’, ‘酱骨鸡’, ‘42.00’);
INSERT INTO menu
VALUES (‘10’, ‘10’, ‘烧鸡公’, ‘68.00’);
INSERT INTO menu
VALUES (‘11’, ‘11’, ‘烤鱼’, ‘78.00’);
INSERT INTO menu
VALUES (‘12’, ‘12’, ‘凉拌黄瓜’, ‘8.00’);
INSERT INTO menu
VALUES (‘13’, ‘13’, ‘油爆大虾’, ‘48.00’);
INSERT INTO menu
VALUES (‘14’, ‘14’, ‘玉米烙’, ‘22.00’);
INSERT INTO menu
VALUES (‘15’, ‘15’, ‘酸辣土豆丝’, ‘12.00’);
INSERT INTO menu
VALUES (‘16’, ‘16’, ‘椒盐排骨’, ‘52.00’);
INSERT INTO menu
VALUES (‘17’, ‘17’, ‘鱼头豆腐汤’, ‘38.00’);
INSERT INTO menu
VALUES (‘18’, ‘18’, ‘醋溜大肠’, ‘38.00’);
INSERT INTO menu
VALUES (‘19’, ‘19’, ‘北京烤鸭’, ‘48.00’);
INSERT INTO menu
VALUES (‘20’, ‘20’, ‘宫保鸡丁’, ‘38.00’);
– Table structure for staff
DROP TABLE IF EXISTS staff
;
CREATE TABLE staff
(
id
int(11) NOT NULL AUTO_INCREMENT,
staffid
int(11) DEFAULT NULL,
name
varchar(255) DEFAULT NULL,
duty
varchar(255) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
– Records of staff
INSERT INTO staff
VALUES (‘1’, ‘1’, ‘李雷’, ‘店长’);
INSERT INTO staff
VALUES (‘2’, ‘2’, ‘陈好’, ‘收银’);
INSERT INTO staff
VALUES (‘3’, ‘3’, ‘郭阳’, ‘收银’);
INSERT INTO staff
VALUES (‘4’, ‘4’, ‘王城’, ‘厨师’);
INSERT INTO staff
VALUES (‘5’, ‘5’, ‘张昊’, ‘厨师’);
INSERT INTO staff
VALUES (‘6’, ‘6’, ‘霍斌’, ‘厨师’);
INSERT INTO staff
VALUES (‘7’, ‘7’, ‘崔琦’, ‘服务员’);
INSERT INTO staff
VALUES (‘8’, ‘8’, ‘张芸京’, ‘服务员’);
INSERT INTO staff
VALUES (‘9’, ‘9’, ‘金俊熠’, ‘服务员’);
INSERT INTO staff
VALUES (‘10’, ‘10’, ‘王敏’, ‘服务员’);
INSERT INTO staff
VALUES (‘11’, ‘11’, ‘陈敏’, ‘服务员’);
INSERT INTO staff
VALUES (‘12’, ‘12’, ‘赵静’, ‘服务员’);