Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 11th, 2012  |  syntax: None  |  size: 2.48 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. -- ----------------------------
  2. -- Table structure for `customers`
  3. -- ----------------------------
  4. DROP TABLE IF EXISTS `customers`;
  5. CREATE TABLE `customers` (
  6.   `customerID` varchar(32) NOT NULL DEFAULT '',
  7.   `name1` varchar(128) DEFAULT NULL,
  8.   `name2` varchar(128) DEFAULT NULL,
  9.   `name3` varchar(128) DEFAULT NULL,
  10.   `cchash` varchar(16) DEFAULT NULL,
  11.   `expiry` timestamp,
  12.   PRIMARY KEY (`customerID`)
  13. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  14.  
  15. -- ----------------------------
  16. -- Table structure for `employees`
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `employees`;
  19. CREATE TABLE `employees` (
  20.   `employeeID` varchar(32) NOT NULL DEFAULT '',
  21.   `name1` varchar(128) NOT NULL DEFAULT,
  22.   `name2` varchar(128) NOT NULL DEFAULT,
  23.   `name3` varchar(128) NOT NULL DEFAULT,
  24.   PRIMARY KEY (`employeeID`)
  25. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  26.  
  27. -- ----------------------------
  28. -- Table structure for `menu`
  29. -- ----------------------------
  30. DROP TABLE IF EXISTS `menu`;
  31. CREATE TABLE `menu` (
  32.   `menuID` varchar(32) NOT NULL,
  33.   `title` varchar(128) NOT NULL,
  34.   `price` double(16,0) NOT NULL,
  35.   `expires` timestamp,
  36.   `type` binary(8) DEFAULT NULL,
  37.    -- This is so you can use a bitfield to show various types of menu options
  38.    -- like
  39.    --           0100100111
  40.    --            ^drink ^part of combo (and so on)
  41.    -- basically just allowing for a lot of permutations that can be
  42.    -- represented by base 10 or whatever you want really
  43.   PRIMARY KEY (`menuID`)
  44. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  45.  
  46. -- ----------------------------
  47. -- Table structure for `orders`
  48. -- ----------------------------
  49. DROP TABLE IF EXISTS `orders`;
  50. CREATE TABLE `orders` (
  51.   `orderID` varchar(32) NOT NULL,
  52.   `orderTime` timestamp NOT NULL,
  53.   `receiptID` varchar(32) DEFAULT NULL, -- in case we have an itemized receipt we want to list
  54.   `customerID` varchar(32) DEFAULT NULL,-- in case the person isn't anonymous (cash)
  55.   `price` double(32,0) DEFAULT NULL,
  56.   `paymentType` enum('golden dubloons','debit','amex','discover','visa','mastercard','cash') DEFAULT NULL,
  57.   PRIMARY KEY (`orderID`,`orderTime`),
  58.   KEY `cID` (`customerID`)
  59. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  60.  
  61. -- ----------------------------
  62. -- Table structure for `receipts`
  63. -- ----------------------------
  64. DROP TABLE IF EXISTS `receipts`;
  65. CREATE TABLE `receipts` (
  66.   `receiptID` varchar(32) NOT NULL,
  67.   `itemID` varchar(32) NOT NULL,
  68.   `price` double(32,0) NOT NULL,
  69.   PRIMARY KEY (`receiptID`)
  70. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;