text: -- phpMyAdmin SQL Dump
  -- version 4.5.1
  -- http://www.phpmyadmin.net
  --
  -- Host: 127.0.0.1
  -- Generation Time: 11 Nov 2017 pada 15.54
  -- Versi Server: 10.1.16-MariaDB
  -- PHP Version: 5.6.24
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET time_zone = "+00:00";
  
  
  /*!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 utf8mb4 */;
  
  --
  -- Database: `binnar_resto`
  --
  CREATE DATABASE IF NOT EXISTS `binnar_resto` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
  USE `binnar_resto`;
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `groups`
  --
  
  DROP TABLE IF EXISTS `groups`;
  CREATE TABLE IF NOT EXISTS `groups` (
    `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
    `name` varchar(20) NOT NULL,
    `description` varchar(100) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data untuk tabel `groups`
  --
  
  INSERT INTO `groups` (`id`, `name`, `description`) VALUES
  (1, 'admin', 'Administrator'),
  (2, 'members', 'General User');
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `login_attempts`
  --
  
  DROP TABLE IF EXISTS `login_attempts`;
  CREATE TABLE IF NOT EXISTS `login_attempts` (
    `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
    `ip_address` varchar(15) NOT NULL,
    `login` varchar(100) NOT NULL,
    `time` int(11) UNSIGNED DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `menu`
  --
  
  DROP TABLE IF EXISTS `menu`;
  CREATE TABLE IF NOT EXISTS `menu` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `NAMA_MENU` text NOT NULL,
    `ID_RESTORAN` int(11) NOT NULL,
    `HARGA` varchar(100) NOT NULL,
    `FOTO_MENU` text NOT NULL,
    `KETERANGAN` text NOT NULL,
    PRIMARY KEY (`ID`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `order_menu`
  --
  
  DROP TABLE IF EXISTS `order_menu`;
  CREATE TABLE IF NOT EXISTS `order_menu` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `ID_RESTO` int(11) NOT NULL,
    `ID_MENU` int(11) NOT NULL,
    `ID_USERAPP` int(11) NOT NULL,
    `JUMLAH` int(11) NOT NULL,
    `ORDER_DATE` date NOT NULL,
    `STATUS` int(11) NOT NULL,
    `ALAMAT_PENGIRIMAN` text NOT NULL,
    PRIMARY KEY (`ID`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `resto`
  --
  
  DROP TABLE IF EXISTS `resto`;
  CREATE TABLE IF NOT EXISTS `resto` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `Nama_Resto` text NOT NULL,
    `Alamat` text NOT NULL,
    `no_tlp` varchar(100) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `tabel_menu`
  --
  
  DROP TABLE IF EXISTS `tabel_menu`;
  CREATE TABLE IF NOT EXISTS `tabel_menu` (
    `id` int(10) NOT NULL AUTO_INCREMENT,
    `judul_menu` varchar(50) NOT NULL,
    `link` varchar(50) NOT NULL,
    `icon` varchar(50) NOT NULL,
    `is_main_menu` varchar(50) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `users`
  --
  
  DROP TABLE IF EXISTS `users`;
  CREATE TABLE IF NOT EXISTS `users` (
    `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
    `ip_address` varchar(15) NOT NULL,
    `username` varchar(100) DEFAULT NULL,
    `password` varchar(255) NOT NULL,
    `salt` varchar(255) DEFAULT NULL,
    `email` varchar(100) NOT NULL,
    `activation_code` varchar(40) DEFAULT NULL,
    `forgotten_password_code` varchar(40) DEFAULT NULL,
    `forgotten_password_time` int(11) UNSIGNED DEFAULT NULL,
    `remember_code` varchar(40) DEFAULT NULL,
    `created_on` int(11) UNSIGNED NOT NULL,
    `last_login` int(11) UNSIGNED DEFAULT NULL,
    `active` tinyint(1) UNSIGNED DEFAULT NULL,
    `first_name` varchar(50) DEFAULT NULL,
    `last_name` varchar(50) DEFAULT NULL,
    `company` varchar(100) DEFAULT NULL,
    `phone` varchar(20) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data untuk tabel `users`
  --
  
  INSERT INTO `users` (`id`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`) VALUES
  (1, '127.0.0.1', 'administrator', '$2a$07$SeBknntpZror9uyftVopmu61qg0ms8Qv1yV6FG.kQOSM.9QhmTo36', '', 'admin@admin.com', '', NULL, NULL, NULL, 1268889823, 1451122425, 1, 'Admin', 'istrator', 'ADMIN', '0');
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `users_groups`
  --
  
  DROP TABLE IF EXISTS `users_groups`;
  CREATE TABLE IF NOT EXISTS `users_groups` (
    `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
    `user_id` int(11) UNSIGNED NOT NULL,
    `group_id` mediumint(8) UNSIGNED NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `uc_users_groups` (`user_id`,`group_id`),
    KEY `fk_users_groups_users1_idx` (`user_id`),
    KEY `fk_users_groups_groups1_idx` (`group_id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data untuk tabel `users_groups`
  --
  
  INSERT INTO `users_groups` (`id`, `user_id`, `group_id`) VALUES
  (1, 1, 1),
  (2, 1, 2);
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `user_app`
  --
  
  DROP TABLE IF EXISTS `user_app`;
  CREATE TABLE IF NOT EXISTS `user_app` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `NAMA` varchar(100) NOT NULL,
    `ALAMAT` text NOT NULL,
    `EMAIL` varchar(100) NOT NULL,
    `PASWORD` varchar(100) NOT NULL,
    PRIMARY KEY (`ID`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
  --
  
  --
  -- Ketidakleluasaan untuk tabel `users_groups`
  --
  ALTER TABLE `users_groups`
    ADD CONSTRAINT `fk_users_groups_groups1` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
    ADD CONSTRAINT `fk_users_groups_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
  
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  