-- MySQL dump 10.13  Distrib 9.3.0, for macos14.7 (x86_64)
--
-- Host: localhost    Database: pos_db
-- ------------------------------------------------------
-- Server version	9.3.0

/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

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

DROP TABLE IF EXISTS `cache`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cache` (
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `expiration` int NOT NULL,
  PRIMARY KEY (`key`),
  KEY `cache_expiration_index` (`expiration`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `cache` WRITE;
/*!40000 ALTER TABLE `cache` DISABLE KEYS */;
/*!40000 ALTER TABLE `cache` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `cache_locks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
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,
  PRIMARY KEY (`key`),
  KEY `cache_locks_expiration_index` (`expiration`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cache_locks`
--

LOCK TABLES `cache_locks` WRITE;
/*!40000 ALTER TABLE `cache_locks` DISABLE KEYS */;
/*!40000 ALTER TABLE `cache_locks` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `categories` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `categories_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `categories` WRITE;
/*!40000 ALTER TABLE `categories` DISABLE KEYS */;
INSERT INTO `categories` VALUES (1,'Buku','buku','Semua jenis buku','2026-04-14 02:57:20','2026-04-14 02:57:20'),(2,'Makanan','makanan','Semua jenis makanan','2026-04-14 02:57:20','2026-04-14 02:57:20'),(3,'Snack','snack','Camilan dan keripik','2026-04-14 02:57:20','2026-04-14 02:57:20'),(4,'Sembako','sembako','Kebutuhan pokok','2026-04-14 02:57:20','2026-04-14 02:57:20'),(5,'Rokok','rokok','Rokok dan tembakau','2026-04-14 02:57:20','2026-04-14 02:57:20'),(6,'Perawatan Diri','perawatan-diri','Sabun, sampo, dsb','2026-04-14 02:57:20','2026-04-14 02:57:20'),(7,'Lainnya','lainnya','Produk lainnya','2026-04-14 02:57:20','2026-04-14 02:57:20');
/*!40000 ALTER TABLE `categories` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `failed_jobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `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,
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `failed_jobs`
--

LOCK TABLES `failed_jobs` WRITE;
/*!40000 ALTER TABLE `failed_jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `failed_jobs` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `job_batches`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
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,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `job_batches`
--

LOCK TABLES `job_batches` WRITE;
/*!40000 ALTER TABLE `job_batches` DISABLE KEYS */;
/*!40000 ALTER TABLE `job_batches` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `jobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `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,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `jobs`
--

LOCK TABLES `jobs` WRITE;
/*!40000 ALTER TABLE `jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `jobs` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `migrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `migrations` WRITE;
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
INSERT INTO `migrations` 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_01_01_000001_add_role_to_users_table',1),(5,'2024_01_01_000002_create_categories_table',1),(6,'2024_01_01_000003_create_products_table',1),(7,'2024_01_01_000004_create_stock_movements_table',1),(8,'2024_01_01_000005_create_transactions_table',1),(9,'2024_01_01_000006_create_transaction_items_table',1),(10,'2024_01_01_000007_create_store_settings_table',1),(11,'2026_03_03_210332_create_personal_access_tokens_table',1);
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `password_reset_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
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,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `password_reset_tokens`
--

LOCK TABLES `password_reset_tokens` WRITE;
/*!40000 ALTER TABLE `password_reset_tokens` DISABLE KEYS */;
/*!40000 ALTER TABLE `password_reset_tokens` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `personal_access_tokens`
--

DROP TABLE IF EXISTS `personal_access_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `personal_access_tokens` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint unsigned NOT NULL,
  `name` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text COLLATE utf8mb4_unicode_ci,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`),
  KEY `personal_access_tokens_expires_at_index` (`expires_at`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `personal_access_tokens`
--

LOCK TABLES `personal_access_tokens` WRITE;
/*!40000 ALTER TABLE `personal_access_tokens` DISABLE KEYS */;
INSERT INTO `personal_access_tokens` VALUES (1,'App\\Models\\User',1,'pos-token','5c6a7ed36e30e702a6ad7f667e9f45ddff322c65d5f6bfc2f4fb1092eb772eb7','[\"*\"]','2026-04-14 04:23:05',NULL,'2026-04-14 02:58:14','2026-04-14 04:23:05');
/*!40000 ALTER TABLE `personal_access_tokens` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `products`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `category_id` bigint unsigned DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `hpp` decimal(15,2) NOT NULL DEFAULT '0.00',
  `sell_price` decimal(15,2) NOT NULL DEFAULT '0.00',
  `stock` int NOT NULL DEFAULT '0',
  `min_stock` int NOT NULL DEFAULT '5',
  `unit` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pcs',
  `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `products_barcode_unique` (`barcode`),
  KEY `products_category_id_foreign` (`category_id`),
  KEY `products_barcode_category_id_is_active_index` (`barcode`,`category_id`,`is_active`),
  CONSTRAINT `products_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `products` WRITE;
/*!40000 ALTER TABLE `products` DISABLE KEYS */;
INSERT INTO `products` VALUES (1,1,'BIMBINGAN KONSELING PAI (PENDIDIKAN AGAMA ISLAM) Raden Roro Wulan Ayu Wardani, S.Pd., M.M',NULL,65000.00,75000.00,199,5,'pcs','products/bFmp5JGC4uKfv2C8c3CYu9mEKLrusotrL1dGlgqN.jpg',1,'2026-04-14 03:00:14','2026-04-14 03:39:01'),(2,1,'BUKU PENELITIAN DALAM APLIKASI CLASSROOM ACTION RESEARCH (CAR) Pendidikan, Bimbingan dan Latihan Menyusun Penelitian Tindakan Kelas (PTK) Untuk Guru dan Mahasiswa',NULL,60000.00,70000.00,146,5,'pcs','products/n66PhVvqcTxLuxlPTkF8Go4Kc7XQEgjaBf5K2hSV.jpg',1,'2026-04-14 03:06:56','2026-04-14 03:39:01'),(3,1,'Classroom Management untuk Mahasiswa Jurusan Pendidikan',NULL,90000.00,102000.00,46,5,'pcs','products/GRMEukGN1E7k9STvKCg3xNbAD1PvSrqFt2CWAitJ.jpg',1,'2026-04-14 03:09:14','2026-04-14 03:39:01'),(4,1,'CYBER SOCIETY: Teknologi, Media Baru, dan Disrupsi Informasi',NULL,70000.00,80000.00,59,5,'pcs','products/Rtt0vldYTCue7B1Cb46cNbtsDWjzM7M64fJ9iyVt.jpg',1,'2026-04-14 03:23:24','2026-04-14 03:39:01'),(5,1,'Fiqih Islam Lengkap - Drs H Moh Rifai - Toha Putra -',NULL,30000.00,40000.00,49,5,'pcs','products/KAN8g5ZWnvsAP8Z7WrvuAWVyV54E8jagSgjNkrQV.jpg',1,'2026-04-14 03:31:32','2026-04-14 03:39:01'),(6,1,'Micro Teaching: Teori dan Praktik',NULL,90000.00,105000.00,69,5,'pcs','products/l7p9phGHMKScpEvPmIZRWOzOw84aqn7PM3r1WgTu.jpg',1,'2026-04-14 03:36:09','2026-04-14 03:39:01'),(7,1,'PENGEMBANGAN BAHAN AJAR PAI',NULL,50000.00,70000.00,49,5,'pcs','products/VTJsmvQ2vTzffVZARvr5OkHse6rpohN82xU3BjVs.webp',1,'2026-04-14 03:38:00','2026-04-14 03:39:01'),(8,1,'Pengembangan Kurikulum Pendidikan Agama Islam (PAI)',NULL,80000.00,90000.00,70,5,'pcs','products/FQMwCf5NgJK9aahfMyWn78ab2ibtgVC0ZzekzPVn.jpg',1,'2026-04-14 04:03:18','2026-04-14 04:03:18'),(9,1,'Inovasi Pengelolaan Lembaga Pendidikan Islam Umar, S.S., M.Pd.; Zulaehatus Sofiah, M.Pd.',NULL,90000.00,100000.00,40,5,'pcs','products/9EZBPEiDzlYn3Hm9Xx6ZuzhAUpc8Qi1v3iZzgmS7.webp',1,'2026-04-14 04:05:05','2026-04-14 04:05:05'),(10,1,'Komunikasi Pembelajaran di Era Digital',NULL,100000.00,150000.00,30,5,'pcs','products/pR3GDYKSFdB00KnJUAw3mcP7fiE1LPgBunRNNVRa.webp',1,'2026-04-14 04:06:45','2026-04-14 04:06:45'),(11,1,'Pendidikan Luar Sekolah Dr. A. Hasdiansyah, S.Pd., M.Pd., M.A; dkk',NULL,100000.00,120000.00,50,5,'pcs','products/I01I6hl193mcrrL7ZHt0ejzDMs65oEl9JeQPNxzL.webp',1,'2026-04-14 04:08:06','2026-04-14 04:08:06'),(12,1,'Menulis Paper Untuk Publikasi Ilmiah Jurnal Bereputasi Prof.Anwar Mallongi,SKM.,MSc.,Ph.D',NULL,90000.00,125000.00,77,5,'pcs','products/bXzvIy9Aqu9KfZ0vnkGyhkKRWXOq87gqmrxmeRdg.png',1,'2026-04-14 04:13:43','2026-04-14 04:13:43'),(13,1,'GURU PAI IDAMAN SISWA: Menjadi Pendidik Dirindukan, Diteladankan, dan Didoakan Penulis : Khairan Efendi, S.Pd.I, M.Pd.I',NULL,90000.00,150000.00,100,5,'pcs','products/IeA50Y9ji691nQCYcHYZeHDaHi5lHI0aHnHJJntG.png',1,'2026-04-14 04:16:40','2026-04-14 04:16:40'),(14,1,'Sejarah Pendidikan Islam Prof. Dr. H. J. Suyuthi Pulungan, M.A.',NULL,80000.00,90000.00,100,5,'pcs','products/47nA5fNqUzSDt0rPsFPAPnALeCR4LpKZF5brHDSH.png',1,'2026-04-14 04:20:05','2026-04-14 04:20:05'),(15,1,'Sosiologi Pendidikan Dr. Ajat Rukajat M.M.Pd. dan Dr. H. Agus Susanto, M.M.',NULL,100000.00,150000.00,80,5,'pcs','products/6fEWUXoof4JdXO9905yEwi27LpafA9j6CNKHB69v.jpg',1,'2026-04-14 04:22:58','2026-04-14 04:22:58');
/*!40000 ALTER TABLE `products` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `sessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
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,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `sessions` WRITE;
/*!40000 ALTER TABLE `sessions` DISABLE KEYS */;
/*!40000 ALTER TABLE `sessions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `stock_movements`
--

DROP TABLE IF EXISTS `stock_movements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `stock_movements` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `product_id` bigint unsigned NOT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `type` enum('in','out','adjustment') COLLATE utf8mb4_unicode_ci NOT NULL,
  `qty` int NOT NULL,
  `qty_before` int NOT NULL,
  `qty_after` int NOT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `stock_movements_user_id_foreign` (`user_id`),
  KEY `stock_movements_product_id_type_created_at_index` (`product_id`,`type`,`created_at`),
  CONSTRAINT `stock_movements_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  CONSTRAINT `stock_movements_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `stock_movements`
--

LOCK TABLES `stock_movements` WRITE;
/*!40000 ALTER TABLE `stock_movements` DISABLE KEYS */;
INSERT INTO `stock_movements` VALUES (1,7,1,'out',1,50,49,'Penjualan INV-20260414-0001','2026-04-14 03:39:01','2026-04-14 03:39:01'),(2,6,1,'out',1,70,69,'Penjualan INV-20260414-0001','2026-04-14 03:39:01','2026-04-14 03:39:01'),(3,5,1,'out',1,50,49,'Penjualan INV-20260414-0001','2026-04-14 03:39:01','2026-04-14 03:39:01'),(4,4,1,'out',1,60,59,'Penjualan INV-20260414-0001','2026-04-14 03:39:01','2026-04-14 03:39:01'),(5,3,1,'out',1,47,46,'Penjualan INV-20260414-0001','2026-04-14 03:39:01','2026-04-14 03:39:01'),(6,2,1,'out',1,147,146,'Penjualan INV-20260414-0001','2026-04-14 03:39:01','2026-04-14 03:39:01'),(7,1,1,'out',1,200,199,'Penjualan INV-20260414-0001','2026-04-14 03:39:01','2026-04-14 03:39:01');
/*!40000 ALTER TABLE `stock_movements` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `store_settings`
--

DROP TABLE IF EXISTS `store_settings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `store_settings` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `store_settings_key_unique` (`key`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `store_settings`
--

LOCK TABLES `store_settings` WRITE;
/*!40000 ALTER TABLE `store_settings` DISABLE KEYS */;
INSERT INTO `store_settings` VALUES (1,'store_name','Gramedia Pustaka','2026-04-14 02:57:20','2026-04-14 03:33:24'),(2,'store_tagline','Belanja Mudah, Harga Bersahabat','2026-04-14 02:57:20','2026-04-14 02:57:20'),(3,'store_address','Jl. Contoh No. 123, Kota Anda','2026-04-14 02:57:20','2026-04-14 02:57:20'),(4,'store_phone',NULL,'2026-04-14 02:57:20','2026-04-14 03:33:24'),(5,'store_email',NULL,'2026-04-14 02:57:20','2026-04-14 03:33:24'),(6,'store_logo',NULL,'2026-04-14 02:57:20','2026-04-14 02:57:20'),(7,'receipt_header','Terima kasih telah berbelanja!','2026-04-14 02:57:20','2026-04-14 02:57:20'),(8,'receipt_footer','Barang yang sudah dibeli tidak dapat dikembalikan.','2026-04-14 02:57:20','2026-04-14 02:57:20'),(9,'receipt_show_logo','true','2026-04-14 02:57:20','2026-04-14 02:57:20'),(10,'tax_enabled','false','2026-04-14 02:57:20','2026-04-14 02:57:20'),(11,'tax_percentage','10','2026-04-14 02:57:20','2026-04-14 03:33:24'),(12,'tax_label','PPN','2026-04-14 02:57:20','2026-04-14 02:57:20'),(13,'currency_symbol','Rp','2026-04-14 02:57:20','2026-04-14 02:57:20'),(14,'currency_code','IDR','2026-04-14 02:57:20','2026-04-14 02:57:20'),(15,'timezone','Asia/Jakarta','2026-04-14 02:57:20','2026-04-14 02:57:20'),(16,'app_version','1.0.0','2026-04-14 02:57:20','2026-04-14 02:57:20');
/*!40000 ALTER TABLE `store_settings` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `transaction_items`
--

DROP TABLE IF EXISTS `transaction_items`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `transaction_items` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` bigint unsigned NOT NULL,
  `product_id` bigint unsigned DEFAULT NULL,
  `product_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `hpp` decimal(15,2) NOT NULL DEFAULT '0.00',
  `sell_price` decimal(15,2) NOT NULL DEFAULT '0.00',
  `qty` int NOT NULL DEFAULT '1',
  `discount_item` decimal(15,2) NOT NULL DEFAULT '0.00',
  `subtotal` decimal(15,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `transaction_items_product_id_foreign` (`product_id`),
  KEY `transaction_items_transaction_id_product_id_index` (`transaction_id`,`product_id`),
  CONSTRAINT `transaction_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE SET NULL,
  CONSTRAINT `transaction_items_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `transaction_items`
--

LOCK TABLES `transaction_items` WRITE;
/*!40000 ALTER TABLE `transaction_items` DISABLE KEYS */;
INSERT INTO `transaction_items` VALUES (1,1,7,'PENGEMBANGAN BAHAN AJAR PAI',50000.00,70000.00,1,0.00,70000.00,'2026-04-14 03:39:01','2026-04-14 03:39:01'),(2,1,6,'Micro Teaching: Teori dan Praktik',90000.00,105000.00,1,0.00,105000.00,'2026-04-14 03:39:01','2026-04-14 03:39:01'),(3,1,5,'Fiqih Islam Lengkap - Drs H Moh Rifai - Toha Putra -',30000.00,40000.00,1,0.00,40000.00,'2026-04-14 03:39:01','2026-04-14 03:39:01'),(4,1,4,'CYBER SOCIETY: Teknologi, Media Baru, dan Disrupsi Informasi',70000.00,80000.00,1,0.00,80000.00,'2026-04-14 03:39:01','2026-04-14 03:39:01'),(5,1,3,'Classroom Management untuk Mahasiswa Jurusan Pendidikan',90000.00,102000.00,1,0.00,102000.00,'2026-04-14 03:39:01','2026-04-14 03:39:01'),(6,1,2,'BUKU PENELITIAN DALAM APLIKASI CLASSROOM ACTION RESEARCH (CAR) Pendidikan, Bimbingan dan Latihan Menyusun Penelitian Tindakan Kelas (PTK) Untuk Guru dan Mahasiswa',60000.00,70000.00,1,0.00,70000.00,'2026-04-14 03:39:01','2026-04-14 03:39:01'),(7,1,1,'BIMBINGAN KONSELING PAI (PENDIDIKAN AGAMA ISLAM) Raden Roro Wulan Ayu Wardani, S.Pd., M.M',65000.00,75000.00,1,0.00,75000.00,'2026-04-14 03:39:01','2026-04-14 03:39:01');
/*!40000 ALTER TABLE `transaction_items` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `transactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `transactions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `invoice_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `subtotal` decimal(15,2) NOT NULL DEFAULT '0.00',
  `discount_amount` decimal(15,2) NOT NULL DEFAULT '0.00',
  `total` decimal(15,2) NOT NULL DEFAULT '0.00',
  `payment_method` enum('cash','transfer','hutang') COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL DEFAULT '0.00',
  `change_amount` decimal(15,2) NOT NULL DEFAULT '0.00',
  `status` enum('completed','voided') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'completed',
  `note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `transactions_invoice_number_unique` (`invoice_number`),
  KEY `idx_tx_invoice` (`invoice_number`),
  KEY `idx_tx_user` (`user_id`),
  KEY `idx_tx_payment` (`payment_method`),
  KEY `idx_tx_created` (`created_at`),
  CONSTRAINT `transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `transactions` WRITE;
/*!40000 ALTER TABLE `transactions` DISABLE KEYS */;
INSERT INTO `transactions` VALUES (1,'INV-20260414-0001',1,542000.00,0.00,542000.00,'cash',600000.00,58000.00,'completed',NULL,'2026-04-14 03:39:00','2026-04-14 03:39:00');
/*!40000 ALTER TABLE `transactions` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `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,
  `role` enum('admin','kasir') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'kasir',
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT 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=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'Admin','admin@pos.com',NULL,'$2y$12$n1LTtsQWBe6IANjmnAEseO/Gmi254HZI/PapDhw4KAWpH68LAgY6O','admin',1,NULL,'2026-04-14 02:57:20','2026-04-14 02:57:20'),(2,'Kasir 1','kasir@pos.com',NULL,'$2y$12$.DRlMLAzODzsGMDuhhBM9ugomE27Qqj26lpe20qElapjOGrktmOjK','kasir',1,NULL,'2026-04-14 02:57:20','2026-04-14 02:57:20');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2026-04-14 18:38:52
