/*
 Navicat Premium Data Transfer

 Source Server         : Localhost
 Source Server Type    : MySQL
 Source Server Version : 50641 (5.6.41)
 Source Host           : localhost:3306
 Source Schema         : cafe

 Target Server Type    : MySQL
 Target Server Version : 50641 (5.6.41)
 File Encoding         : 65001

 Date: 02/09/2025 12:48:45
*/


-- ----------------------------
-- Table structure for failed_jobs
-- ----------------------------
CREATE TABLE `failed_jobs`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uuid` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `failed_jobs_uuid_unique`(`uuid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of failed_jobs
-- ----------------------------

-- ----------------------------
-- Table structure for migrations
-- ----------------------------
CREATE TABLE `migrations`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `migration` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- 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_reset_tokens_table', 1);
INSERT INTO `migrations` VALUES (3, '2014_10_12_100000_create_password_resets_table', 1);
INSERT INTO `migrations` VALUES (4, '2019_08_19_000000_create_failed_jobs_table', 1);
INSERT INTO `migrations` VALUES (5, '2019_12_14_000001_create_personal_access_tokens_table', 1);
INSERT INTO `migrations` VALUES (6, '2023_04_07_142757_create_permission_tables', 1);
INSERT INTO `migrations` VALUES (7, '2023_04_07_142915_create_products_table', 1);
INSERT INTO `migrations` VALUES (8, '2025_07_23_061040_create_transaksi', 1);
INSERT INTO `migrations` VALUES (9, '2025_08_23_204502_create_transaksi_detail', 1);

-- ----------------------------
-- Table structure for model_has_permissions
-- ----------------------------
CREATE TABLE `model_has_permissions`  (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL,
  PRIMARY KEY (`permission_id`, `model_id`, `model_type`) USING BTREE,
  INDEX `model_has_permissions_model_id_model_type_index`(`model_id`, `model_type`) USING BTREE,
  CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of model_has_permissions
-- ----------------------------

-- ----------------------------
-- Table structure for model_has_roles
-- ----------------------------
CREATE TABLE `model_has_roles`  (
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL,
  PRIMARY KEY (`role_id`, `model_id`, `model_type`) USING BTREE,
  INDEX `model_has_roles_model_id_model_type_index`(`model_id`, `model_type`) USING BTREE,
  CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of model_has_roles
-- ----------------------------
INSERT INTO `model_has_roles` VALUES (1, 'App\\Models\\User', 1);

-- ----------------------------
-- Records of password_resets
-- ----------------------------

-- ----------------------------
-- Table structure for permissions
-- ----------------------------
CREATE TABLE `permissions`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `permissions_name_guard_name_unique`(`name`, `guard_name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of permissions
-- ----------------------------
INSERT INTO `permissions` VALUES (1, 'role-list', 'web', '2025-08-24 16:16:38', '2025-08-24 16:16:38');
INSERT INTO `permissions` VALUES (2, 'role-create', 'web', '2025-08-24 16:16:38', '2025-08-24 16:16:38');
INSERT INTO `permissions` VALUES (3, 'role-edit', 'web', '2025-08-24 16:16:38', '2025-08-24 16:16:38');
INSERT INTO `permissions` VALUES (4, 'role-delete', 'web', '2025-08-24 16:16:38', '2025-08-24 16:16:38');
INSERT INTO `permissions` VALUES (5, 'transaksi-list', 'web', '2025-08-24 16:16:38', '2025-08-24 16:16:38');
INSERT INTO `permissions` VALUES (6, 'transaksi-create', 'web', '2025-08-24 16:16:38', '2025-08-24 16:16:38');
INSERT INTO `permissions` VALUES (7, 'transaksi-edit', 'web', '2025-08-24 16:16:38', '2025-08-24 16:16:38');
INSERT INTO `permissions` VALUES (8, 'transaksi-delete', 'web', '2025-08-24 16:16:38', '2025-08-24 16:16:38');

-- ----------------------------
-- Records of personal_access_tokens
-- ----------------------------

-- ----------------------------
-- Table structure for products
-- ----------------------------
CREATE TABLE `products`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `foto` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `harga` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of products
-- ----------------------------
INSERT INTO `products` VALUES (1, NULL, 'Caramel Coffe Latte', '17000', NULL, NULL, NULL);
INSERT INTO `products` VALUES (2, NULL, 'Kopi Gula Aren', '17000', NULL, NULL, NULL);
INSERT INTO `products` VALUES (3, NULL, 'Chocolate Latte', '17000', NULL, NULL, NULL);
INSERT INTO `products` VALUES (4, NULL, 'Kopi Susu', '17000', NULL, NULL, NULL);
INSERT INTO `products` VALUES (5, NULL, 'Butterscoth Coffe Latte', '17000', NULL, NULL, NULL);
INSERT INTO `products` VALUES (6, NULL, 'Matcha Latte', '17000', NULL, NULL, NULL);
INSERT INTO `products` VALUES (7, NULL, 'Huzelnut Coffe Latte', '17000', NULL, NULL, NULL);
INSERT INTO `products` VALUES (8, NULL, 'Strawberry Coffe Latte', '17000', NULL, NULL, NULL);
INSERT INTO `products` VALUES (9, NULL, 'Redvelvet Latte', '17000', NULL, NULL, NULL);

-- ----------------------------
-- Table structure for role_has_permissions
-- ----------------------------
CREATE TABLE `role_has_permissions`  (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL,
  PRIMARY KEY (`permission_id`, `role_id`) USING BTREE,
  INDEX `role_has_permissions_role_id_foreign`(`role_id`) USING BTREE,
  CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of role_has_permissions
-- ----------------------------
INSERT INTO `role_has_permissions` VALUES (1, 1);
INSERT INTO `role_has_permissions` VALUES (2, 1);
INSERT INTO `role_has_permissions` VALUES (3, 1);
INSERT INTO `role_has_permissions` VALUES (4, 1);
INSERT INTO `role_has_permissions` VALUES (5, 1);
INSERT INTO `role_has_permissions` VALUES (6, 1);
INSERT INTO `role_has_permissions` VALUES (7, 1);
INSERT INTO `role_has_permissions` VALUES (8, 1);

-- ----------------------------
-- Table structure for roles
-- ----------------------------
CREATE TABLE `roles`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `roles_name_guard_name_unique`(`name`, `guard_name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of roles
-- ----------------------------
INSERT INTO `roles` VALUES (1, 'Super Admin', 'web', '2025-08-24 16:16:38', '2025-08-24 16:16:38');

-- ----------------------------
-- Table structure for transaksi
-- ----------------------------
CREATE TABLE `transaksi`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `order_code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `method` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `channel` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `subtotal` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `grandtotal` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `tax` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `proof_path` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `status` enum('belum_bayar','sudah_bayar','') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of transaksi
-- ----------------------------
INSERT INTO `transaksi` VALUES (1, 'BKK-20250824-B00E', 'syarifa', 'syarifa@gmail.com', 'ewallet', 'dana', '85000', '93500', '8500', 'payment-proofs/BKK-20250824-B00E/proof-BKK-20250824-B00E-20250824162402.jpeg', NULL, '2025-08-24 16:24:02', '2025-08-24 16:24:02');
INSERT INTO `transaksi` VALUES (2, 'BKK-20250824-4EE6', 'cust', 'cust@gmail.com', 'ewallet', 'gopay', '17000', '18700', '1700', 'payment-proofs/BKK-20250824-4EE6/proof-BKK-20250824-4EE6-20250824164521.jpeg', NULL, '2025-08-24 16:45:21', '2025-08-24 16:45:21');
INSERT INTO `transaksi` VALUES (3, 'BKK-20250824-806B', 'syarifa', 'syaripah2004@gmail.com', 'ewallet', 'dana', '17000', '18700', '1700', NULL, NULL, '2025-08-24 23:50:39', '2025-08-24 23:50:39');
INSERT INTO `transaksi` VALUES (4, 'BKK-20250901-92D2', 'Syaripah Nasriyah', 'syaripah2004@gmail.com', 'qris', 'qris', '17000', '18700', '1700', NULL, NULL, '2025-09-01 00:07:10', '2025-09-01 00:07:10');
INSERT INTO `transaksi` VALUES (5, 'BKK-20250901-C3B0', 'as', 'asdsd@gmail.com', 'qris', 'qris', '95000', '104500', '9500', NULL, NULL, '2025-09-01 22:59:39', '2025-09-01 22:59:39');
INSERT INTO `transaksi` VALUES (6, 'BKK-20250901-6F2A', 'as', 'asdsd@gmail.com', 'qris', 'qris', '112000', '123200', '11200', NULL, NULL, '2025-09-01 22:59:52', '2025-09-01 22:59:52');
INSERT INTO `transaksi` VALUES (7, 'BKK-20250901-7E76', 'teasd', 'asdads@gmail.com', 'qris', 'qris', '95000', '104500', '9500', NULL, NULL, '2025-09-01 23:08:13', '2025-09-01 23:08:13');
INSERT INTO `transaksi` VALUES (8, 'BKK-20250901-B63F', 'teasd', 'asdads@gmail.com', 'qris', 'qris', '100000', '110000', '10000', NULL, NULL, '2025-09-01 23:08:27', '2025-09-01 23:08:27');
INSERT INTO `transaksi` VALUES (9, 'BKK-20250901-C808', 'teasd', 'asdads@gmail.com', 'qris', 'qris', '112000', '123200', '11200', NULL, NULL, '2025-09-01 23:08:36', '2025-09-01 23:08:36');

-- ----------------------------
-- Table structure for transaksi_detail
-- ----------------------------
CREATE TABLE `transaksi_detail`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `idtransaksi` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `qty` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `price` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `line_total` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of transaksi_detail
-- ----------------------------
INSERT INTO `transaksi_detail` VALUES (1, '1', 'Kopi Gula Aren', '1', '17000', '17000', '2025-08-24 16:24:02', '2025-08-24 16:24:02');
INSERT INTO `transaksi_detail` VALUES (2, '1', 'Chocolate Latte', '3', '17000', '51000', '2025-08-24 16:24:02', '2025-08-24 16:24:02');
INSERT INTO `transaksi_detail` VALUES (3, '1', 'Caramel Coffee Latte', '1', '17000', '17000', '2025-08-24 16:24:02', '2025-08-24 16:24:02');
INSERT INTO `transaksi_detail` VALUES (4, '2', 'Kopi Gula Aren', '1', '17000', '17000', '2025-08-24 16:45:21', '2025-08-24 16:45:21');
INSERT INTO `transaksi_detail` VALUES (5, '3', 'Chocolate Latte', '1', '17000', '17000', '2025-08-24 23:50:39', '2025-08-24 23:50:39');
INSERT INTO `transaksi_detail` VALUES (6, '4', 'Caramel Coffee Latte', '1', '17000', '17000', '2025-09-01 00:07:10', '2025-09-01 00:07:10');
INSERT INTO `transaksi_detail` VALUES (7, '5', 'Affogato', '1', '95000', '95000', '2025-09-01 22:59:39', '2025-09-01 22:59:39');
INSERT INTO `transaksi_detail` VALUES (8, '6', 'Americano', '1', '112000', '112000', '2025-09-01 22:59:52', '2025-09-01 22:59:52');
INSERT INTO `transaksi_detail` VALUES (9, '7', 'Affogato', '1', '95000', '95000', '2025-09-01 23:08:13', '2025-09-01 23:08:13');
INSERT INTO `transaksi_detail` VALUES (10, '8', 'Arabica', '1', '100000', '100000', '2025-09-01 23:08:27', '2025-09-01 23:08:27');
INSERT INTO `transaksi_detail` VALUES (11, '9', 'Americano', '1', '112000', '112000', '2025-09-01 23:08:36', '2025-09-01 23:08:36');

