forked from gardenia2007/happyPHP
-
Notifications
You must be signed in to change notification settings - Fork 3
/
db.sql
123 lines (94 loc) · 2.93 KB
/
db.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
-- phpMyAdmin SQL Dump
-- version 3.3.2deb1ubuntu1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2012 年 11 月 02 日 17:06
-- 服务器版本: 5.1.63
-- PHP 版本: 5.3.2-1ubuntu4.18
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- 数据库: `happy`
--
-- --------------------------------------------------------
--
-- 表的结构 `admin`
--
CREATE TABLE IF NOT EXISTS `admin` (
`uid` int(11) NOT NULL,
`rid` int(11) NOT NULL,
PRIMARY KEY (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- 转存表中的数据 `admin`
--
-- --------------------------------------------------------
--
-- 表的结构 `customer`
--
CREATE TABLE IF NOT EXISTS `customer` (
`phone` int(11) NOT NULL,
`point` int(11) NOT NULL,
`uid` int(11) NOT NULL,
PRIMARY KEY (`phone`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- 转存表中的数据 `customer`
--
-- --------------------------------------------------------
--
-- 表的结构 `queue`
--
CREATE TABLE IF NOT EXISTS `queue` (
`qid` int(11) NOT NULL AUTO_INCREMENT,
`rid` int(11) NOT NULL,
`table` int(11) NOT NULL,
`phone` bigint(20) DEFAULT NULL,
`num` int(11) NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`suppose_arrive_time` bigint(20) DEFAULT NULL,
`arrive_time` bigint(20) DEFAULT NULL,
`status` enum('queuing','smsed','serveing','finshed','quited') NOT NULL,
PRIMARY KEY (`qid`),
KEY `rid` (`rid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- 转存表中的数据 `queue`
--
-- --------------------------------------------------------
--
-- 表的结构 `restaurant`
--
CREATE TABLE IF NOT EXISTS `restaurant` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`phone` varchar(14) NOT NULL,
`addr` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`describe` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
--
-- 转存表中的数据 `restaurant`
--
INSERT INTO `restaurant` (`id`, `name`, `phone`, `addr`, `describe`) VALUES
(1, '永福小吃', '18009872345', '西大直街92号', ''),
(7, '李记酱骨', '18009872345', '西大直街92号', ''),
(8, '张记酱骨', '18009872345', '西大直街92号', ''),
(9, '徐记酱骨', '18009872345', '西大直街92号', '');
-- --------------------------------------------------------
--
-- 表的结构 `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`passwd` varchar(64) NOT NULL,
PRIMARY KEY (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- 转存表中的数据 `user`
--