text: -- phpMyAdmin SQL Dump
  -- version 4.7.4
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1:3306
  -- Generation Time: May 19, 2020 at 03:05 PM
  -- Server version: 5.1.33-community
  -- PHP Version: 7.1.9
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  START TRANSACTION;
  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 utf8 */;
  
  --
  -- Database: `petshop`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `about`
  --
  
  DROP TABLE IF EXISTS `about`;
  CREATE TABLE IF NOT EXISTS `about` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `content` text NOT NULL,
    `image` text NOT NULL,
    `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`)
  ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `about`
  --
  
  INSERT INTO `about` (`id`, `content`, `image`, `updated_date`) VALUES
  (1, 'Palace Pet Shop adalah tempat', 'about_palace_petshop.png', '2020-05-09 10:12:57');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `category`
  --
  
  DROP TABLE IF EXISTS `category`;
  CREATE TABLE IF NOT EXISTS `category` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(50) NOT NULL,
    `slug` varchar(100) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `category`
  --
  
  INSERT INTO `category` (`id`, `name`, `slug`) VALUES
  (1, 'Accessories', 'accessories.html'),
  (2, 'Cat Food', 'cat-food.html'),
  (3, 'Dog Food', 'dog-food.html');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `mail`
  --
  
  DROP TABLE IF EXISTS `mail`;
  CREATE TABLE IF NOT EXISTS `mail` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(50) NOT NULL,
    `email` varchar(50) NOT NULL,
    `subject` varchar(300) NOT NULL,
    `message` text NOT NULL,
    `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `mail`
  --
  
  INSERT INTO `mail` (`id`, `name`, `email`, `subject`, `message`, `date`) VALUES
  (1, 'aziz', 'javaziez@gmail.com', 'test', 'coba-coba', '2020-05-09 09:46:28');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `photo`
  --
  
  DROP TABLE IF EXISTS `photo`;
  CREATE TABLE IF NOT EXISTS `photo` (
    `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `product_id` int(10) UNSIGNED NOT NULL,
    `files` varchar(300) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `fk_photo_product1_idx` (`product_id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `photo`
  --
  
  INSERT INTO `photo` (`id`, `product_id`, `files`) VALUES
  (1, 1, 'palace-petshop-1-1.jpg'),
  (2, 2, 'palace-petshop-2-1.jpg'),
  (3, 3, 'palace-petshop-3-1.jpg'),
  (4, 4, 'palace-petshop-4-1.jpg'),
  (5, 5, 'palace-petshop-5-1.jpg'),
  (8, 6, 'service.jpg');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `price`
  --
  
  DROP TABLE IF EXISTS `price`;
  CREATE TABLE IF NOT EXISTS `price` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `product_id` int(10) UNSIGNED NOT NULL,
    `nominal` double NOT NULL DEFAULT '0',
    `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    KEY `fk_price_product1_idx` (`product_id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `price`
  --
  
  INSERT INTO `price` (`id`, `product_id`, `nominal`, `updated_date`) VALUES
  (1, 1, 18000, '2020-05-01 23:38:23'),
  (2, 2, 12500, '2020-05-01 23:38:04'),
  (3, 3, 25000, '2020-05-01 23:38:18'),
  (4, 4, 55000, '2020-05-01 23:38:30'),
  (5, 5, 30000, '2020-05-01 23:38:37'),
  (6, 6, 12500, '2020-05-05 15:14:53'),
  (7, 6, 15000, '2020-05-06 14:25:28');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `product`
  --
  
  DROP TABLE IF EXISTS `product`;
  CREATE TABLE IF NOT EXISTS `product` (
    `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `category_id` int(11) NOT NULL,
    `code` varchar(20) NOT NULL,
    `name` varchar(300) NOT NULL,
    `description` text,
    `active` tinyint(1) NOT NULL DEFAULT '1',
    `unit_id` int(11) NOT NULL,
    `stock` int(11) NOT NULL DEFAULT '0',
    `stock_wh` int(11) NOT NULL DEFAULT '0',
    `homepage` tinyint(1) NOT NULL DEFAULT '0',
    `slug` varchar(400) NOT NULL,
    `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `updated_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `fk_product_category_idx` (`category_id`),
    KEY `fk_product_unit1_idx` (`unit_id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `product`
  --
  
  INSERT INTO `product` (`id`, `category_id`, `code`, `name`, `description`, `active`, `unit_id`, `stock`, `stock_wh`, `homepage`, `slug`, `created_date`, `updated_date`) VALUES
  (1, 1, 'KL-LOKAL 01', 'KALUNG KUCING MOTIF', 'Kalung kucing motif adalah ...', 1, 1, 10, 2, 1, 'kalung-kucing-motif.html', '0000-00-00 00:00:00', NULL),
  (2, 1, '69259280183', 'BOLA KARET RAINBOW', 'Bola karet rainbow  adalah ...', 1, 1, 5, 0, 0, 'bola-karet-rainbow.html', '0000-00-00 00:00:00', NULL),
  (3, 2, 'REP-110', 'GEOPET TUNA 1/2 KG', 'Geopet Tuna adalah ...', 1, 3, 20, 5, 1, 'geopet-tuna-1-2-kg.html', '0000-00-00 00:00:00', NULL),
  (4, 2, 'REP-29', 'FRISKIES 1/2 KG RPK', 'Friskies  adalah ...', 1, 2, 10, 2, 1, 'friskies-1-2-kg-rpk.html', '0000-00-00 00:00:00', NULL),
  (5, 2, 'EP-113', 'BOLT IKAN 1/2 KG', 'Bolt Ikan adalah ...', 1, 3, 40, 10, 1, 'bolt-ikan-1-2-kg.html', '0000-00-00 00:00:00', NULL),
  (6, 2, 'TEST-0101', 'Product Test 01', 'coba-coba saja', 1, 1, 15, 5, 0, 'test-0101-product-test-01.html', '2020-05-07 09:00:49', '2020-05-07 09:00:49');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `services`
  --
  
  DROP TABLE IF EXISTS `services`;
  CREATE TABLE IF NOT EXISTS `services` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `title` varchar(200) NOT NULL,
    `content` text NOT NULL,
    `image` varchar(100) DEFAULT NULL,
    `slug` varchar(200) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `services`
  --
  
  INSERT INTO `services` (`id`, `title`, `content`, `image`, `slug`) VALUES
  (1, 'Grooming', 'Kami menyediakan layanan Grooming.', 'grooming.jpg', 'grooming.html'),
  (2, 'Klinik', 'Kami menyediakan Klinik', 'clinic.jpg', 'klinik.html');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `unit`
  --
  
  DROP TABLE IF EXISTS `unit`;
  CREATE TABLE IF NOT EXISTS `unit` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(50) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `unit`
  --
  
  INSERT INTO `unit` (`id`, `name`) VALUES
  (1, 'Pcs'),
  (2, 'Bungkus'),
  (3, 'Kaleng');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  DROP TABLE IF EXISTS `user`;
  CREATE TABLE IF NOT EXISTS `user` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `email` varchar(50) NOT NULL,
    `password` varchar(50) NOT NULL,
    `active` tinyint(1) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`id`, `email`, `password`, `active`) VALUES
  (1, 'admin@palacepetshop.com', '202cb962ac59075b964b07152d234b70', 1);
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `photo`
  --
  ALTER TABLE `photo`
    ADD CONSTRAINT `fk_photo_product1` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
  
  --
  -- Constraints for table `price`
  --
  ALTER TABLE `price`
    ADD CONSTRAINT `fk_price_product1` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
  
  --
  -- Constraints for table `product`
  --
  ALTER TABLE `product`
    ADD CONSTRAINT `fk_product_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
    ADD CONSTRAINT `fk_product_unit1` FOREIGN KEY (`unit_id`) REFERENCES `unit` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
  COMMIT;
  
  /*!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 */;
  