Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- phpMyAdmin SQL Dump
- -- version 4.7.3
- -- https://www.phpmyadmin.net/
- --
- -- Host: localhost
- -- Generation Time: Nov 20, 2017 at 01:08 PM
- -- Server version: 5.6.35
- -- PHP Version: 7.1.8
- SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
- SET time_zone = "+00:00";
- --
- -- Database: `restaurant`
- --
- -- --------------------------------------------------------
- --
- -- Table structure for table `employee`
- --
- CREATE TABLE `employee` (
- `emp_id` int(11) NOT NULL,
- `emp_name` varchar(255) NOT NULL,
- `emp_password` varchar(255) NOT NULL,
- `emp_desc` varchar(255) DEFAULT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- --------------------------------------------------------
- --
- -- Table structure for table `item`
- --
- CREATE TABLE `item` (
- `item_id` int(11) NOT NULL,
- `item_cn_name` varchar(255) NOT NULL,
- `item_en_name` varchar(255) DEFAULT NULL,
- `item_desc` varchar(255) DEFAULT NULL,
- `item_price` decimal(6,2) NOT NULL,
- `img_url` varchar(255) NOT NULL,
- `user_id` varchar(30) DEFAULT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- --------------------------------------------------------
- --
- -- Table structure for table `order`
- --
- CREATE TABLE `order` (
- `order_id` int(11) NOT NULL,
- `order_datetime` datetime DEFAULT NULL,
- `order_type` varchar(255) DEFAULT NULL,
- `order_sum` decimal(6,2) DEFAULT NULL,
- `actual_sum` decimal(6,2) DEFAULT NULL,
- `payment_type` varchar(255) DEFAULT NULL,
- `order_status` varchar(255) DEFAULT NULL,
- `emp_id` int(11) NOT NULL,
- `table_id` int(11) DEFAULT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- --------------------------------------------------------
- --
- -- Table structure for table `order_has_items`
- --
- CREATE TABLE `order_has_items` (
- `order_id` int(11) NOT NULL,
- `item_id` int(11) NOT NULL,
- `item_qty` int(10) NOT NULL,
- `item_desc` varchar(255) DEFAULT NULL,
- `item_status` varchar(255) DEFAULT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- --------------------------------------------------------
- --
- -- Table structure for table `table`
- --
- CREATE TABLE `table` (
- `table_id` int(11) NOT NULL,
- `table_name` varchar(255) NOT NULL,
- `table_desc` varchar(255) DEFAULT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- --
- -- Indexes for dumped tables
- --
- --
- -- Indexes for table `employee`
- --
- ALTER TABLE `employee`
- ADD PRIMARY KEY (`emp_id`);
- --
- -- Indexes for table `item`
- --
- ALTER TABLE `item`
- ADD PRIMARY KEY (`item_id`);
- --
- -- Indexes for table `order`
- --
- ALTER TABLE `order`
- ADD PRIMARY KEY (`order_id`);
- --
- -- Indexes for table `order_has_items`
- --
- ALTER TABLE `order_has_items`
- ADD PRIMARY KEY (`order_id`);
- --
- -- Indexes for table `table`
- --
- ALTER TABLE `table`
- ADD PRIMARY KEY (`table_id`);
- --
- -- Constraints for dumped tables
- --
- --
- -- Constraints for table `order_has_items`
- --
- ALTER TABLE `order_has_items`
- ADD CONSTRAINT `order_id_fk` FOREIGN KEY (`order_id`) REFERENCES `order` (`order_id`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement