- -- ----------------------------
- -- Table structure for `customers`
- -- ----------------------------
- DROP TABLE IF EXISTS `customers`;
- CREATE TABLE `customers` (
- `customerID` varchar(32) NOT NULL DEFAULT '',
- `name1` varchar(128) DEFAULT NULL,
- `name2` varchar(128) DEFAULT NULL,
- `name3` varchar(128) DEFAULT NULL,
- `cchash` varchar(16) DEFAULT NULL,
- `expiry` timestamp,
- PRIMARY KEY (`customerID`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for `employees`
- -- ----------------------------
- DROP TABLE IF EXISTS `employees`;
- CREATE TABLE `employees` (
- `employeeID` varchar(32) NOT NULL DEFAULT '',
- `name1` varchar(128) NOT NULL DEFAULT,
- `name2` varchar(128) NOT NULL DEFAULT,
- `name3` varchar(128) NOT NULL DEFAULT,
- PRIMARY KEY (`employeeID`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for `menu`
- -- ----------------------------
- DROP TABLE IF EXISTS `menu`;
- CREATE TABLE `menu` (
- `menuID` varchar(32) NOT NULL,
- `title` varchar(128) NOT NULL,
- `price` double(16,0) NOT NULL,
- `expires` timestamp,
- `type` binary(8) DEFAULT NULL,
- -- This is so you can use a bitfield to show various types of menu options
- -- like
- -- 0100100111
- -- ^drink ^part of combo (and so on)
- -- basically just allowing for a lot of permutations that can be
- -- represented by base 10 or whatever you want really
- PRIMARY KEY (`menuID`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for `orders`
- -- ----------------------------
- DROP TABLE IF EXISTS `orders`;
- CREATE TABLE `orders` (
- `orderID` varchar(32) NOT NULL,
- `orderTime` timestamp NOT NULL,
- `receiptID` varchar(32) DEFAULT NULL, -- in case we have an itemized receipt we want to list
- `customerID` varchar(32) DEFAULT NULL,-- in case the person isn't anonymous (cash)
- `price` double(32,0) DEFAULT NULL,
- `paymentType` enum('golden dubloons','debit','amex','discover','visa','mastercard','cash') DEFAULT NULL,
- PRIMARY KEY (`orderID`,`orderTime`),
- KEY `cID` (`customerID`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for `receipts`
- -- ----------------------------
- DROP TABLE IF EXISTS `receipts`;
- CREATE TABLE `receipts` (
- `receiptID` varchar(32) NOT NULL,
- `itemID` varchar(32) NOT NULL,
- `price` double(32,0) NOT NULL,
- PRIMARY KEY (`receiptID`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8;