text: /*
  Navicat MySQL Data Transfer
  
  Source Server         : localhost
  Source Server Version : 50505
  Source Host           : localhost:3306
  Source Database       : eventory
  
  Target Server Type    : MYSQL
  Target Server Version : 50505
  File Encoding         : 65001
  
  Date: 2020-12-22 20:39:24
  */
  
  SET FOREIGN_KEY_CHECKS=0;
  
  -- ----------------------------
  -- Table structure for barang
  -- ----------------------------
  DROP TABLE IF EXISTS `barang`;
  CREATE TABLE `barang` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `user_id` bigint(20) unsigned NOT NULL,
    `nama` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `jumlah` int(11) NOT NULL DEFAULT 0,
    `harga` int(11) NOT NULL DEFAULT 0,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `barang_user_id_foreign` (`user_id`),
    CONSTRAINT `barang_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- ----------------------------
  -- Records of barang
  -- ----------------------------
  INSERT INTO `barang` VALUES ('1', '2', 'paralon-satu inci', '8', '12000', '2020-12-19 14:27:09', '2020-12-22 02:07:44');
  INSERT INTO `barang` VALUES ('2', '2', 'semen 25 kg', '0', '14000', '2020-12-21 22:10:40', '2020-12-22 02:05:10');
  
  -- ----------------------------
  -- Table structure for barangkeluar
  -- ----------------------------
  DROP TABLE IF EXISTS `barangkeluar`;
  CREATE TABLE `barangkeluar` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `user_id` int(11) NOT NULL,
    `barang_id` bigint(20) unsigned NOT NULL,
    `jumlah` int(11) NOT NULL,
    `hargajual` int(11) NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `barangkeluar_barang_id_foreign` (`barang_id`),
    CONSTRAINT `barangkeluar_barang_id_foreign` FOREIGN KEY (`barang_id`) REFERENCES `barang` (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- ----------------------------
  -- Records of barangkeluar
  -- ----------------------------
  INSERT INTO `barangkeluar` VALUES ('4', '1', '1', '2', '15000', '2020-12-22 02:07:44', '2020-12-22 02:07:44');
  
  -- ----------------------------
  -- Table structure for barangmasuk
  -- ----------------------------
  DROP TABLE IF EXISTS `barangmasuk`;
  CREATE TABLE `barangmasuk` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `user_id` int(11) NOT NULL,
    `barang_id` bigint(20) unsigned NOT NULL,
    `pemasok` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `hargabeli` int(11) NOT NULL,
    `jumlah` int(11) NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `barangmasuk_barang_id_foreign` (`barang_id`),
    CONSTRAINT `barangmasuk_barang_id_foreign` FOREIGN KEY (`barang_id`) REFERENCES `barang` (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- ----------------------------
  -- Records of barangmasuk
  -- ----------------------------
  INSERT INTO `barangmasuk` VALUES ('33', '1', '1', 'suhadi', '120000', '10', '2020-12-22 02:05:31', '2020-12-22 02:05:31');
  
  -- ----------------------------
  -- Table structure for migrations
  -- ----------------------------
  DROP TABLE IF EXISTS `migrations`;
  CREATE TABLE `migrations` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `batch` int(11) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- ----------------------------
  -- Records of migrations
  -- ----------------------------
  INSERT INTO `migrations` VALUES ('1', '2014_10_12_000000_create_users_table', '1');
  INSERT INTO `migrations` VALUES ('2', '2014_10_12_100000_create_password_resets_table', '1');
  INSERT INTO `migrations` VALUES ('3', '2020_12_18_181615_barang_table', '1');
  INSERT INTO `migrations` VALUES ('4', '2020_12_18_182731_barangmasuk_table', '1');
  INSERT INTO `migrations` VALUES ('5', '2020_12_18_182743_barangkeluar_table', '1');
  
  -- ----------------------------
  -- Table structure for password_resets
  -- ----------------------------
  DROP TABLE IF EXISTS `password_resets`;
  CREATE TABLE `password_resets` (
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    KEY `password_resets_email_index` (`email`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- ----------------------------
  -- Records of password_resets
  -- ----------------------------
  
  -- ----------------------------
  -- Table structure for users
  -- ----------------------------
  DROP TABLE IF EXISTS `users`;
  CREATE TABLE `users` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `admin` tinyint(1) NOT NULL DEFAULT 0,
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `users_email_unique` (`email`)
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- ----------------------------
  -- Records of users
  -- ----------------------------
  INSERT INTO `users` VALUES ('1', 'operator1', '0', 'operator@gmail.com', '$2y$10$p1TBJVjo3B5MMUiIBaOLp..x/lBvf2QSjwGkpcNb1ZFQRu6C4R.Uy', '2020-12-19 13:59:01', '2020-12-22 19:16:59');
  INSERT INTO `users` VALUES ('2', 'admin', '1', 'admin@gmail.com', '$2y$10$ToAC4soJGg2AKuoJY72sj.Fno9FZF8RPE8Zbo9pjBm9gzppaTy9Ia', '2020-12-19 14:01:59', '2020-12-19 14:01:59');
  