-- phpMyAdmin SQL Dump
-- version 6.0.0-dev+20250927.af95a2e028
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 18, 2026 at 12:29 AM
-- Server version: 8.4.3
-- PHP Version: 8.3.16

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 utf8mb4 */;

--
-- Database: `point_of_sales`
--

-- --------------------------------------------------------

--
-- Table structure for table `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `expiration` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cache`
--

INSERT INTO `cache` (`key`, `value`, `expiration`) VALUES
('arya@gmail.com|127.0.0.1', 'i:1;', 1768695652),
('arya@gmail.com|127.0.0.1:timer', 'i:1768695652;', 1768695652),
('spatie.permission.cache', 'a:3:{s:5:\"alias\";a:4:{s:1:\"a\";s:2:\"id\";s:1:\"b\";s:4:\"name\";s:1:\"c\";s:10:\"guard_name\";s:1:\"r\";s:5:\"roles\";}s:11:\"permissions\";a:29:{i:0;a:4:{s:1:\"a\";i:1;s:1:\"b\";s:16:\"dashboard-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:12;}}i:1;a:4:{s:1:\"a\";i:2;s:1:\"b\";s:12:\"users-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:2;a:4:{s:1:\"a\";i:3;s:1:\"b\";s:12:\"users-create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:3;a:4:{s:1:\"a\";i:4;s:1:\"b\";s:12:\"users-update\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:4;a:4:{s:1:\"a\";i:5;s:1:\"b\";s:12:\"users-delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:5;a:4:{s:1:\"a\";i:6;s:1:\"b\";s:12:\"roles-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:2;}}i:6;a:4:{s:1:\"a\";i:7;s:1:\"b\";s:12:\"roles-create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:2;}}i:7;a:4:{s:1:\"a\";i:8;s:1:\"b\";s:12:\"roles-update\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:2;}}i:8;a:4:{s:1:\"a\";i:9;s:1:\"b\";s:12:\"roles-delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:2;}}i:9;a:4:{s:1:\"a\";i:10;s:1:\"b\";s:18:\"permissions-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:3;}}i:10;a:4:{s:1:\"a\";i:11;s:1:\"b\";s:18:\"permissions-create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:3;}}i:11;a:4:{s:1:\"a\";i:12;s:1:\"b\";s:18:\"permissions-update\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:3;}}i:12;a:4:{s:1:\"a\";i:13;s:1:\"b\";s:18:\"permissions-delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:3;}}i:13;a:4:{s:1:\"a\";i:14;s:1:\"b\";s:17:\"categories-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:4;}}i:14;a:4:{s:1:\"a\";i:15;s:1:\"b\";s:17:\"categories-create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:4;}}i:15;a:4:{s:1:\"a\";i:16;s:1:\"b\";s:15:\"categories-edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:4;}}i:16;a:4:{s:1:\"a\";i:17;s:1:\"b\";s:17:\"categories-delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:4;}}i:17;a:4:{s:1:\"a\";i:18;s:1:\"b\";s:15:\"products-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:5;}}i:18;a:4:{s:1:\"a\";i:19;s:1:\"b\";s:15:\"products-create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:5;}}i:19;a:4:{s:1:\"a\";i:20;s:1:\"b\";s:13:\"products-edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:5;}}i:20;a:4:{s:1:\"a\";i:21;s:1:\"b\";s:15:\"products-delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:5;}}i:21;a:4:{s:1:\"a\";i:22;s:1:\"b\";s:16:\"customers-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:6;i:1;i:12;}}i:22;a:4:{s:1:\"a\";i:23;s:1:\"b\";s:16:\"customers-create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:6;i:1;i:12;}}i:23;a:4:{s:1:\"a\";i:24;s:1:\"b\";s:14:\"customers-edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:6;}}i:24;a:4:{s:1:\"a\";i:25;s:1:\"b\";s:16:\"customers-delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:6;}}i:25;a:4:{s:1:\"a\";i:26;s:1:\"b\";s:19:\"transactions-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:7;i:1;i:12;}}i:26;a:4:{s:1:\"a\";i:27;s:1:\"b\";s:14:\"reports-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:8;}}i:27;a:4:{s:1:\"a\";i:28;s:1:\"b\";s:14:\"profits-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:9;}}i:28;a:4:{s:1:\"a\";i:29;s:1:\"b\";s:23:\"payment-settings-access\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:10;}}}s:5:\"roles\";a:11:{i:0;a:3:{s:1:\"a\";i:12;s:1:\"b\";s:7:\"cashier\";s:1:\"c\";s:3:\"web\";}i:1;a:3:{s:1:\"a\";i:1;s:1:\"b\";s:12:\"users-access\";s:1:\"c\";s:3:\"web\";}i:2;a:3:{s:1:\"a\";i:2;s:1:\"b\";s:12:\"roles-access\";s:1:\"c\";s:3:\"web\";}i:3;a:3:{s:1:\"a\";i:3;s:1:\"b\";s:17:\"permission-access\";s:1:\"c\";s:3:\"web\";}i:4;a:3:{s:1:\"a\";i:4;s:1:\"b\";s:17:\"categories-access\";s:1:\"c\";s:3:\"web\";}i:5;a:3:{s:1:\"a\";i:5;s:1:\"b\";s:15:\"products-access\";s:1:\"c\";s:3:\"web\";}i:6;a:3:{s:1:\"a\";i:6;s:1:\"b\";s:16:\"customers-access\";s:1:\"c\";s:3:\"web\";}i:7;a:3:{s:1:\"a\";i:7;s:1:\"b\";s:19:\"transactions-access\";s:1:\"c\";s:3:\"web\";}i:8;a:3:{s:1:\"a\";i:8;s:1:\"b\";s:14:\"reports-access\";s:1:\"c\";s:3:\"web\";}i:9;a:3:{s:1:\"a\";i:9;s:1:\"b\";s:14:\"profits-access\";s:1:\"c\";s:3:\"web\";}i:10;a:3:{s:1:\"a\";i:10;s:1:\"b\";s:23:\"payment-settings-access\";s:1:\"c\";s:3:\"web\";}}}', 1768782007);

-- --------------------------------------------------------

--
-- Table structure for table `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `owner` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `expiration` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `carts`
--

CREATE TABLE `carts` (
  `id` bigint UNSIGNED NOT NULL,
  `cashier_id` bigint UNSIGNED NOT NULL,
  `product_id` bigint UNSIGNED NOT NULL,
  `qty` int NOT NULL,
  `price` bigint NOT NULL,
  `hold_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `hold_label` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `held_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` bigint UNSIGNED NOT NULL,
  `image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `image`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'cat-minuman.jpg', 'Minuman', 'Aneka minuman segar dan kemasan', '2026-01-17 17:18:00', '2026-01-17 17:18:00'),
(2, 'cat-makanan-ringan.jpg', 'Makanan Ringan', 'Camilan dan snack kemasan', '2026-01-17 17:18:00', '2026-01-17 17:18:00'),
(3, 'cat-makanan-berat.jpg', 'Makanan Berat', 'Makanan siap saji dan frozen food', '2026-01-17 17:18:01', '2026-01-17 17:18:01'),
(4, 'cat-produk-susu.jpg', 'Produk Susu', 'Susu, yogurt, dan produk olahan susu', '2026-01-17 17:18:02', '2026-01-17 17:18:02'),
(5, 'cat-roti-kue.jpg', 'Roti & Kue', 'Roti segar dan aneka kue', '2026-01-17 17:18:03', '2026-01-17 17:18:03'),
(6, 'cat-bumbu-rempah.jpg', 'Bumbu & Rempah', 'Bumbu masak dan rempah-rempah', '2026-01-17 17:18:04', '2026-01-17 17:18:04'),
(7, 'cat-perawatan-tubuh.jpg', 'Perawatan Tubuh', 'Sabun, shampoo, dan perawatan diri', '2026-01-17 17:18:05', '2026-01-17 17:18:05'),
(8, 'cat-kebutuhan-rumah.jpg', 'Kebutuhan Rumah', 'Perlengkapan rumah tangga', '2026-01-17 17:18:05', '2026-01-17 17:18:05');

-- --------------------------------------------------------

--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `no_telp` bigint NOT NULL,
  `address` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` (`id`, `name`, `no_telp`, `address`, `created_at`, `updated_at`) VALUES
(1, 'Yosila', 6281291878467, 'Jl. Sedi No. 22', '2026-01-17 17:17:58', '2026-01-17 17:21:59'),
(2, 'Bunga Maharani', 6281312345678, 'Jl. Mawar No. 5, Jakarta', '2026-01-17 17:17:58', '2026-01-17 17:17:58'),
(3, 'Cici Amelia', 6281512340000, 'Jl. Anggrek No. 17, Surabaya', '2026-01-17 17:17:58', '2026-01-17 17:17:58'),
(4, 'Davin Pradipta', 6285612349911, 'Jl. Kenanga No. 2, Yogyakarta', '2026-01-17 17:17:58', '2026-01-17 17:17:58'),
(5, 'Eko Saputra', 6287712348822, 'Jl. Cemara No. 45, Semarang', '2026-01-17 17:17:59', '2026-01-17 17:17:59'),
(6, 'Fitri Lestari', 6282213345566, 'Jl. Sakura No. 7, Medan', '2026-01-17 17:17:59', '2026-01-17 17:17:59'),
(7, 'Gina Putri', 6281399887766, 'Jl. Dahlia No. 12, Malang', '2026-01-17 17:17:59', '2026-01-17 17:17:59'),
(8, 'Hendra Wijaya', 6285544332211, 'Jl. Flamboyan No. 8, Denpasar', '2026-01-17 17:17:59', '2026-01-17 17:17:59');

-- --------------------------------------------------------

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint UNSIGNED NOT NULL,
  `reserved_at` int UNSIGNED DEFAULT NULL,
  `available_at` int UNSIGNED NOT NULL,
  `created_at` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2024_06_13_082620_create_permission_tables', 1),
(5, '2024_06_13_091315_add_avatar_field_to_users_table', 1),
(6, '2024_06_13_125039_create_customers_table', 1),
(7, '2024_06_13_130507_create_categories_table', 1),
(8, '2024_06_13_131744_create_products_table', 1),
(9, '2024_06_13_132800_create_transactions_table', 1),
(10, '2024_06_13_133940_create_transaction_details_table', 1),
(11, '2024_06_13_133948_create_carts_table', 1),
(12, '2024_06_13_133955_create_profits_table', 1),
(13, '2025_11_19_172334_create_payment_settings_table', 1),
(14, '2025_11_19_172346_add_payment_columns_to_transactions_table', 1),
(15, '2025_12_23_140000_add_hold_columns_to_carts_table', 1);

-- --------------------------------------------------------

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint UNSIGNED NOT NULL,
  `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_permissions`
--

INSERT INTO `model_has_permissions` (`permission_id`, `model_type`, `model_id`) VALUES
(1, 'App\\Models\\User', 1),
(2, 'App\\Models\\User', 1),
(3, 'App\\Models\\User', 1),
(4, 'App\\Models\\User', 1),
(5, 'App\\Models\\User', 1),
(6, 'App\\Models\\User', 1),
(7, 'App\\Models\\User', 1),
(8, 'App\\Models\\User', 1),
(9, 'App\\Models\\User', 1),
(10, 'App\\Models\\User', 1),
(11, 'App\\Models\\User', 1),
(12, 'App\\Models\\User', 1),
(13, 'App\\Models\\User', 1),
(14, 'App\\Models\\User', 1),
(15, 'App\\Models\\User', 1),
(16, 'App\\Models\\User', 1),
(17, 'App\\Models\\User', 1),
(18, 'App\\Models\\User', 1),
(19, 'App\\Models\\User', 1),
(20, 'App\\Models\\User', 1),
(21, 'App\\Models\\User', 1),
(22, 'App\\Models\\User', 1),
(23, 'App\\Models\\User', 1),
(24, 'App\\Models\\User', 1),
(25, 'App\\Models\\User', 1),
(26, 'App\\Models\\User', 1),
(27, 'App\\Models\\User', 1),
(28, 'App\\Models\\User', 1),
(29, 'App\\Models\\User', 1),
(26, 'App\\Models\\User', 2);

-- --------------------------------------------------------

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` bigint UNSIGNED NOT NULL,
  `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(11, 'App\\Models\\User', 1);

-- --------------------------------------------------------

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `payment_settings`
--

CREATE TABLE `payment_settings` (
  `id` bigint UNSIGNED NOT NULL,
  `default_gateway` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cash',
  `midtrans_enabled` tinyint(1) NOT NULL DEFAULT '0',
  `midtrans_server_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `midtrans_client_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `midtrans_production` tinyint(1) NOT NULL DEFAULT '0',
  `xendit_enabled` tinyint(1) NOT NULL DEFAULT '0',
  `xendit_secret_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `xendit_public_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `xendit_production` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_settings`
--

INSERT INTO `payment_settings` (`id`, `default_gateway`, `midtrans_enabled`, `midtrans_server_key`, `midtrans_client_key`, `midtrans_production`, `xendit_enabled`, `xendit_secret_key`, `xendit_public_key`, `xendit_production`, `created_at`, `updated_at`) VALUES
(1, 'cash', 0, NULL, NULL, 0, 0, NULL, NULL, 0, '2026-01-17 17:17:58', '2026-01-17 17:17:58');

-- --------------------------------------------------------

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'dashboard-access', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(2, 'users-access', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(3, 'users-create', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(4, 'users-update', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(5, 'users-delete', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(6, 'roles-access', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(7, 'roles-create', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(8, 'roles-update', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(9, 'roles-delete', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(10, 'permissions-access', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(11, 'permissions-create', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(12, 'permissions-update', 'web', '2026-01-17 17:17:56', '2026-01-17 17:17:56'),
(13, 'permissions-delete', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(14, 'categories-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(15, 'categories-create', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(16, 'categories-edit', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(17, 'categories-delete', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(18, 'products-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(19, 'products-create', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(20, 'products-edit', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(21, 'products-delete', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(22, 'customers-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(23, 'customers-create', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(24, 'customers-edit', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(25, 'customers-delete', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(26, 'transactions-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(27, 'reports-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(28, 'profits-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(29, 'payment-settings-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57');

-- --------------------------------------------------------

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint UNSIGNED NOT NULL,
  `category_id` bigint UNSIGNED NOT NULL,
  `image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `buy_price` bigint NOT NULL,
  `sell_price` bigint NOT NULL,
  `stock` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `category_id`, `image`, `barcode`, `title`, `description`, `buy_price`, `sell_price`, `stock`, `created_at`, `updated_at`) VALUES
(1, 1, 'prod-aqua-botol-600ml.jpg', 'MNM-0001', 'Aqua Botol 600ml', 'Air mineral murni dalam kemasan botol praktis', 3000, 5000, 197, '2026-01-17 17:18:06', '2026-01-17 17:18:25'),
(2, 1, 'prod-teh-botol-sosro-450ml.jpg', 'MNM-0002', 'Teh Botol Sosro 450ml', 'Teh manis segar dalam kemasan botol', 4000, 6000, 148, '2026-01-17 17:18:07', '2026-01-17 17:18:25'),
(3, 1, 'prod-kopi-susu-gula-aren.jpg', 'MNM-0003', 'Kopi Susu Gula Aren', 'Kopi susu dengan gula aren asli', 12000, 18000, 78, '2026-01-17 17:18:08', '2026-01-17 17:18:25'),
(4, 1, 'prod-jus-jeruk-segar-500ml.jpg', 'MNM-0004', 'Jus Jeruk Segar 500ml', 'Jus jeruk murni tanpa pengawet', 8000, 12000, 60, '2026-01-17 17:18:08', '2026-01-17 17:18:08'),
(5, 2, 'prod-chitato-original-68g.jpg', 'SNK-0001', 'Chitato Original 68g', 'Keripik kentang renyah rasa original', 8000, 12000, 118, '2026-01-17 17:18:09', '2026-01-17 17:18:25'),
(6, 2, 'prod-oreo-vanilla-133g.jpg', 'SNK-0002', 'Oreo Vanilla 133g', 'Biskuit sandwich dengan krim vanilla', 10000, 15000, 99, '2026-01-17 17:18:10', '2026-01-17 17:18:25'),
(7, 2, 'prod-indomie-goreng.jpg', 'SNK-0003', 'Indomie Goreng', 'Mie instant goreng favorit Indonesia', 2500, 3500, 295, '2026-01-17 17:18:11', '2026-01-17 17:18:25'),
(8, 2, 'prod-pringles-sour-cream.jpg', 'SNK-0004', 'Pringles Sour Cream', 'Keripik kentang premium rasa sour cream', 25000, 35000, 50, '2026-01-17 17:18:12', '2026-01-17 17:18:12'),
(9, 3, 'prod-nasi-goreng-frozen.jpg', 'MKN-0001', 'Nasi Goreng Frozen', 'Nasi goreng siap saji tinggal panaskan', 15000, 22000, 40, '2026-01-17 17:18:13', '2026-01-17 17:18:13'),
(10, 3, 'prod-ayam-goreng-frozen.jpg', 'MKN-0002', 'Ayam Goreng Frozen', 'Ayam goreng krispy siap goreng', 25000, 38000, 33, '2026-01-17 17:18:14', '2026-01-17 17:18:25'),
(11, 3, 'prod-sosis-sapi-500g.jpg', 'MKN-0003', 'Sosis Sapi 500g', 'Sosis sapi premium isi 12 pcs', 35000, 48000, 43, '2026-01-17 17:18:14', '2026-01-17 17:18:25'),
(12, 4, 'prod-ultra-milk-1l.jpg', 'SSU-0001', 'Ultra Milk 1L', 'Susu UHT full cream', 16000, 21000, 78, '2026-01-17 17:18:15', '2026-01-17 17:18:25'),
(13, 4, 'prod-yogurt-cimory-250ml.jpg', 'SSU-0002', 'Yogurt Cimory 250ml', 'Yogurt drink rasa strawberry', 8000, 12000, 58, '2026-01-17 17:18:16', '2026-01-17 17:18:25'),
(14, 4, 'prod-keju-cheddar-165g.jpg', 'SSU-0003', 'Keju Cheddar 165g', 'Keju cheddar slice praktis', 22000, 30000, 40, '2026-01-17 17:18:17', '2026-01-17 17:18:17'),
(15, 5, 'prod-roti-tawar-sari-roti.jpg', 'RTI-0001', 'Roti Tawar Sari Roti', 'Roti tawar lembut tanpa kulit', 12000, 16000, 49, '2026-01-17 17:18:17', '2026-01-17 17:18:25'),
(16, 5, 'prod-donat-coklat.jpg', 'RTI-0002', 'Donat Coklat', 'Donat lembut dengan topping coklat', 5000, 8000, 27, '2026-01-17 17:18:18', '2026-01-17 17:18:25'),
(17, 5, 'prod-croissant-butter.jpg', 'RTI-0003', 'Croissant Butter', 'Croissant dengan butter premium', 10000, 15000, 25, '2026-01-17 17:18:18', '2026-01-17 17:18:18'),
(18, 6, 'prod-kecap-manis-abc-600ml.jpg', 'BMB-0001', 'Kecap Manis ABC 600ml', 'Kecap manis kualitas premium', 18000, 25000, 68, '2026-01-17 17:18:19', '2026-01-17 17:18:25'),
(19, 6, 'prod-minyak-goreng-2l.jpg', 'BMB-0002', 'Minyak Goreng 2L', 'Minyak goreng sawit berkualitas', 28000, 38000, 89, '2026-01-17 17:18:20', '2026-01-17 17:18:25'),
(20, 6, 'prod-gula-pasir-1kg.jpg', 'BMB-0003', 'Gula Pasir 1kg', 'Gula pasir putih premium', 14000, 18000, 100, '2026-01-17 17:18:20', '2026-01-17 17:18:20'),
(21, 7, 'prod-sabun-lifebuoy-85g.jpg', 'PRW-0001', 'Sabun Lifebuoy 85g', 'Sabun mandi antibakteri', 4000, 6500, 148, '2026-01-17 17:18:21', '2026-01-17 17:18:25'),
(22, 7, 'prod-shampoo-pantene-170ml.jpg', 'PRW-0002', 'Shampoo Pantene 170ml', 'Shampoo anti rontok', 22000, 32000, 59, '2026-01-17 17:18:22', '2026-01-17 17:18:25'),
(23, 7, 'prod-pasta-gigi-pepsodent-190g.jpg', 'PRW-0003', 'Pasta Gigi Pepsodent 190g', 'Pasta gigi pencegah gigi berlubang', 12000, 18000, 100, '2026-01-17 17:18:22', '2026-01-17 17:18:22'),
(24, 8, 'prod-tisu-paseo-250-sheet.jpg', 'RMH-0001', 'Tisu Paseo 250 Sheet', 'Tisu wajah lembut dan kuat', 15000, 22000, 78, '2026-01-17 17:18:23', '2026-01-17 17:18:25'),
(25, 8, 'default.jpg', 'RMH-0002', 'Sabun Cuci Piring 800ml', 'Sabun cuci piring anti lemak', 12000, 18000, 90, '2026-01-17 17:18:24', '2026-01-17 17:18:24'),
(26, 8, 'prod-pewangi-pakaian-900ml.jpg', 'RMH-0003', 'Pewangi Pakaian 900ml', 'Pelembut dan pewangi pakaian', 18000, 26000, 69, '2026-01-17 17:18:25', '2026-01-17 17:18:25');

-- --------------------------------------------------------

--
-- Table structure for table `profits`
--

CREATE TABLE `profits` (
  `id` bigint UNSIGNED NOT NULL,
  `transaction_id` bigint UNSIGNED NOT NULL,
  `total` bigint NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `profits`
--

INSERT INTO `profits` (`id`, `transaction_id`, `total`, `created_at`, `updated_at`) VALUES
(1, 1, 6000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(2, 1, 8000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(3, 1, 4000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(4, 2, 10000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(5, 2, 9000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(6, 2, 5000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(7, 3, 26000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(8, 3, 10000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(9, 3, 14000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(10, 4, 12000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(11, 4, 5000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(12, 4, 8000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(13, 5, 10000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(14, 5, 14000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(15, 5, 26000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(16, 5, 8000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(17, 6, 4000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(18, 6, 5000, '2026-01-17 17:18:25', '2026-01-17 17:18:25');

-- --------------------------------------------------------

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'users-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(2, 'roles-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(3, 'permission-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(4, 'categories-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(5, 'products-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(6, 'customers-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(7, 'transactions-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(8, 'reports-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(9, 'profits-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(10, 'payment-settings-access', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(11, 'super-admin', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57'),
(12, 'cashier', 'web', '2026-01-17 17:17:57', '2026-01-17 17:17:57');

-- --------------------------------------------------------

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_has_permissions`
--

INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
(2, 1),
(3, 1),
(4, 1),
(5, 1),
(6, 2),
(7, 2),
(8, 2),
(9, 2),
(10, 3),
(11, 3),
(12, 3),
(13, 3),
(14, 4),
(15, 4),
(16, 4),
(17, 4),
(18, 5),
(19, 5),
(20, 5),
(21, 5),
(22, 6),
(23, 6),
(24, 6),
(25, 6),
(26, 7),
(27, 8),
(28, 9),
(29, 10),
(1, 12),
(22, 12),
(23, 12),
(26, 12);

-- --------------------------------------------------------

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('8LLJXYdIVVKX31HsTFAgSeMuvA6nV5g7f7Had16O', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', 'YToyOntzOjY6Il90b2tlbiI7czo0MDoiR0QyT2lISXpMb1QyQzNTUkphWlVMVVRpUzZHRVBzTHMxV2ZNb0RKayI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1768696118),
('I92uLcpktUTzV3B1YXCOWNsEYsDbd1HIUKltJhj3', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiMHVJMmdFTVF0Zk1tN2dDYXF0Y09MUFlHZXNhRjVydlVBNEZrYldTRCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1768696137);

-- --------------------------------------------------------

--
-- Table structure for table `transactions`
--

CREATE TABLE `transactions` (
  `id` bigint UNSIGNED NOT NULL,
  `cashier_id` bigint UNSIGNED NOT NULL,
  `customer_id` bigint UNSIGNED DEFAULT NULL,
  `invoice` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cash` bigint NOT NULL,
  `change` bigint NOT NULL,
  `discount` bigint NOT NULL,
  `grand_total` bigint NOT NULL,
  `payment_method` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cash',
  `payment_status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'paid',
  `payment_reference` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_url` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transactions`
--

INSERT INTO `transactions` (`id`, `cashier_id`, `customer_id`, `invoice`, `cash`, `change`, `discount`, `grand_total`, `payment_method`, `payment_status`, `payment_reference`, `payment_url`, `created_at`, `updated_at`) VALUES
(1, 2, 1, 'TRX-SNZI81FB', 100000, 50000, 5000, 50000, 'cash', 'paid', NULL, NULL, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(2, 2, 2, 'TRX-C6RP4GZ5', 150000, 71000, 0, 79000, 'cash', 'paid', NULL, NULL, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(3, 2, 3, 'TRX-4OGICAYV', 200000, 52000, 10000, 148000, 'cash', 'paid', NULL, NULL, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(4, 2, 4, 'TRX-PPMU4JWS', 80000, 2500, 0, 77500, 'cash', 'paid', NULL, NULL, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(5, 2, 6, 'TRX-GZ5PJSKB', 250000, 61000, 15000, 189000, 'cash', 'paid', NULL, NULL, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(6, 2, NULL, 'TRX-SQGMYQGS', 50000, 23000, 0, 27000, 'cash', 'paid', NULL, NULL, '2026-01-17 17:18:25', '2026-01-17 17:18:25');

-- --------------------------------------------------------

--
-- Table structure for table `transaction_details`
--

CREATE TABLE `transaction_details` (
  `id` bigint UNSIGNED NOT NULL,
  `transaction_id` bigint UNSIGNED NOT NULL,
  `product_id` bigint UNSIGNED NOT NULL,
  `qty` int NOT NULL,
  `price` bigint NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transaction_details`
--

INSERT INTO `transaction_details` (`id`, `transaction_id`, `product_id`, `qty`, `price`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 3, 15000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(2, 1, 5, 2, 24000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(3, 1, 15, 1, 16000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(4, 2, 12, 2, 42000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(5, 2, 16, 3, 24000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(6, 2, 21, 2, 13000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(7, 3, 10, 2, 76000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(8, 3, 19, 1, 38000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(9, 3, 24, 2, 44000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(10, 4, 3, 2, 36000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(11, 4, 7, 5, 17500, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(12, 4, 13, 2, 24000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(13, 5, 22, 1, 32000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(14, 5, 18, 2, 50000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(15, 5, 11, 2, 96000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(16, 5, 26, 1, 26000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(17, 6, 2, 2, 12000, '2026-01-17 17:18:25', '2026-01-17 17:18:25'),
(18, 6, 6, 1, 15000, '2026-01-17 17:18:25', '2026-01-17 17:18:25');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`, `avatar`) VALUES
(1, 'Super Admin', 'superadmin@gmail.com', NULL, '$2y$12$ekdC22NAB5EAtHecGNr1cOzBmckymUVYOd2WANxgLBikDB.7Cvn0S', 'DCFqikqAHJp6NMGQbdDYZVFaC3A7UMHxLVowlCaFnraSetGI4eViauR8x67M', '2026-01-17 17:17:58', '2026-01-17 17:17:58', NULL),
(2, 'Cashier', 'cashier@gmail.com', NULL, '$2y$12$DwEMq7J71590opa0YQLaa.0J1VQeGvGJZ8TVW9WR3aOzAxjSozSi6', NULL, '2026-01-17 17:17:58', '2026-01-17 17:17:58', NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `carts`
--
ALTER TABLE `carts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `carts_product_id_foreign` (`product_id`),
  ADD KEY `carts_hold_id_index` (`hold_id`),
  ADD KEY `carts_cashier_id_hold_id_index` (`cashier_id`,`hold_id`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Indexes for table `job_batches`
--
ALTER TABLE `job_batches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `payment_settings`
--
ALTER TABLE `payment_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `products_barcode_unique` (`barcode`),
  ADD KEY `products_category_id_foreign` (`category_id`);

--
-- Indexes for table `profits`
--
ALTER TABLE `profits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `profits_transaction_id_foreign` (`transaction_id`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `role_has_permissions_role_id_foreign` (`role_id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `transactions_cashier_id_foreign` (`cashier_id`),
  ADD KEY `transactions_customer_id_foreign` (`customer_id`);

--
-- Indexes for table `transaction_details`
--
ALTER TABLE `transaction_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `transaction_details_transaction_id_foreign` (`transaction_id`),
  ADD KEY `transaction_details_product_id_foreign` (`product_id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `carts`
--
ALTER TABLE `carts`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `customers`
--
ALTER TABLE `customers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `payment_settings`
--
ALTER TABLE `payment_settings`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `profits`
--
ALTER TABLE `profits`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `transaction_details`
--
ALTER TABLE `transaction_details`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `carts`
--
ALTER TABLE `carts`
  ADD CONSTRAINT `carts_cashier_id_foreign` FOREIGN KEY (`cashier_id`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `carts_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`);

--
-- Constraints for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `products`
--
ALTER TABLE `products`
  ADD CONSTRAINT `products_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`);

--
-- Constraints for table `profits`
--
ALTER TABLE `profits`
  ADD CONSTRAINT `profits_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`);

--
-- Constraints for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `transactions`
--
ALTER TABLE `transactions`
  ADD CONSTRAINT `transactions_cashier_id_foreign` FOREIGN KEY (`cashier_id`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `transactions_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`);

--
-- Constraints for table `transaction_details`
--
ALTER TABLE `transaction_details`
  ADD CONSTRAINT `transaction_details_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
  ADD CONSTRAINT `transaction_details_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`);
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 */;
