-- MySQL dump 10.13  Distrib 8.0.36, for Linux (x86_64)
--
-- Host: localhost    Database: cashier_assistant
-- ------------------------------------------------------
-- Server version	5.7.42

/*!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 utf8 */;
/*!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 `messenger_messages`
--

DROP TABLE IF EXISTS `messenger_messages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `messenger_messages` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `body` longtext NOT NULL,
  `headers` longtext NOT NULL,
  `queue_name` varchar(190) NOT NULL,
  `created_at` datetime NOT NULL,
  `available_at` datetime NOT NULL,
  `delivered_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_75EA56E0FB7336F0` (`queue_name`),
  KEY `IDX_75EA56E0E3BD61CE` (`available_at`),
  KEY `IDX_75EA56E016BA31DB` (`delivered_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `messenger_messages`
--

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

--
-- Table structure for table `offers`
--

DROP TABLE IF EXISTS `offers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `offers` (
  `id` varchar(36) NOT NULL,
  `quantity` int(11) NOT NULL,
  `price_cents` int(11) NOT NULL,
  `is_deleted` tinyint(4) NOT NULL,
  `updated_at` datetime NOT NULL,
  `product_id` varchar(36) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_DA4604274584665A` (`product_id`),
  CONSTRAINT `FK_DA4604274584665A` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `offers`
--

LOCK TABLES `offers` WRITE;
/*!40000 ALTER TABLE `offers` DISABLE KEYS */;
INSERT INTO `offers` VALUES ('382330a5-8027-4602-b1f9-3b2f6d7fc899',2,400,0,'2026-08-11 01:28:20','ae6b23f0-5a8d-4928-b635-8059e0ff5b1e');
/*!40000 ALTER TABLE `offers` 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` varchar(36) NOT NULL,
  `barcode` varchar(64) NOT NULL,
  `name` varchar(160) NOT NULL,
  `brand` varchar(120) DEFAULT NULL,
  `category` varchar(40) NOT NULL,
  `price_cents` int(11) NOT NULL,
  `size` double DEFAULT NULL,
  `size_label` varchar(40) DEFAULT NULL,
  `stock_on_hand` int(11) NOT NULL,
  `reorder_point` int(11) NOT NULL,
  `is_tax_allowed` tinyint(4) NOT NULL,
  `is_favorite` tinyint(4) NOT NULL,
  `is_deleted` tinyint(4) NOT NULL,
  `image_path` varchar(255) DEFAULT NULL,
  `image_url` varchar(255) DEFAULT NULL,
  `sync_status` varchar(20) NOT NULL,
  `client_id` varchar(36) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `store_id` varchar(36) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `products_store_barcode_unique` (`store_id`,`barcode`),
  KEY `IDX_B3BA5A5AB092A811` (`store_id`),
  KEY `products_store_name_idx` (`store_id`,`name`),
  CONSTRAINT `FK_B3BA5A5AB092A811` FOREIGN KEY (`store_id`) REFERENCES `stores` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!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 ('0361e92e-59cd-4323-b680-53fede5ee593','06717401','Dasani Water','Dasani','softDrink',149,591,'591 ml',2,10,0,0,0,NULL,NULL,'synced',NULL,'2026-08-11 01:28:20','2026-08-11 01:28:20','8241c908-a268-4867-85dc-e6714e489812'),('726aec6a-98ec-4e8d-bf13-8fca8957704d','0123456789012','Salted Chips','Store Brand','grocery',199,NULL,NULL,25,6,1,0,0,NULL,NULL,'synced',NULL,'2026-08-11 01:28:20','2026-08-11 01:28:20','8241c908-a268-4867-85dc-e6714e489812'),('ae6b23f0-5a8d-4928-b635-8059e0ff5b1e','5449000000996','Coca-Cola Original Taste','Coca-Cola','softDrink',250,500,'500 ml',4,8,1,0,0,NULL,NULL,'synced',NULL,'2026-08-11 01:28:20','2026-08-11 01:28:20','8241c908-a268-4867-85dc-e6714e489812');
/*!40000 ALTER TABLE `products` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sale_lines`
--

DROP TABLE IF EXISTS `sale_lines`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sale_lines` (
  `id` varchar(36) NOT NULL,
  `barcode` varchar(64) NOT NULL,
  `name_snapshot` varchar(180) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_price_cents` int(11) NOT NULL,
  `offer_id` varchar(36) DEFAULT NULL,
  `line_subtotal_cents` int(11) NOT NULL,
  `line_tax_cents` int(11) NOT NULL,
  `tax_basis_points` int(11) NOT NULL,
  `sale_id` varchar(36) NOT NULL,
  `product_id` varchar(36) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_9FDDD4154A7E4868` (`sale_id`),
  KEY `IDX_9FDDD4154584665A` (`product_id`),
  CONSTRAINT `FK_9FDDD4154584665A` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE SET NULL,
  CONSTRAINT `FK_9FDDD4154A7E4868` FOREIGN KEY (`sale_id`) REFERENCES `sales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sale_lines`
--

LOCK TABLES `sale_lines` WRITE;
/*!40000 ALTER TABLE `sale_lines` DISABLE KEYS */;
INSERT INTO `sale_lines` VALUES ('2d70187f-3840-4c4f-a41c-6fea867c972a','5449000000996','Coca-Cola Original Taste',2,250,NULL,400,52,1300,'e4ebb467-45d5-4fe8-9249-9753b726ea39','ae6b23f0-5a8d-4928-b635-8059e0ff5b1e');
/*!40000 ALTER TABLE `sale_lines` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sales`
--

DROP TABLE IF EXISTS `sales`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sales` (
  `id` varchar(36) NOT NULL,
  `sale_number` varchar(40) NOT NULL,
  `status` varchar(20) NOT NULL,
  `payment_method` varchar(20) NOT NULL,
  `subtotal_cents` int(11) NOT NULL,
  `tax_cents` int(11) NOT NULL,
  `total_cents` int(11) NOT NULL,
  `cash_tendered_cents` int(11) DEFAULT NULL,
  `change_due_cents` int(11) DEFAULT NULL,
  `device_id` varchar(64) NOT NULL,
  `void_reason` varchar(255) DEFAULT NULL,
  `sync_status` varchar(20) NOT NULL,
  `client_id` varchar(36) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `store_id` varchar(36) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `sales_store_number_unique` (`store_id`,`sale_number`),
  KEY `IDX_6B817044B092A811` (`store_id`),
  KEY `sales_store_created_idx` (`store_id`,`created_at`),
  CONSTRAINT `FK_6B817044B092A811` FOREIGN KEY (`store_id`) REFERENCES `stores` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sales`
--

LOCK TABLES `sales` WRITE;
/*!40000 ALTER TABLE `sales` DISABLE KEYS */;
INSERT INTO `sales` VALUES ('e4ebb467-45d5-4fe8-9249-9753b726ea39','CA-DEMO-0001','completed','cash',400,52,452,500,48,'demo-device',NULL,'synced',NULL,'2026-08-11 01:28:20','2026-08-11 01:28:20','8241c908-a268-4867-85dc-e6714e489812');
/*!40000 ALTER TABLE `sales` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `stores`
--

DROP TABLE IF EXISTS `stores`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `stores` (
  `id` varchar(36) NOT NULL,
  `name` varchar(160) NOT NULL,
  `code` varchar(64) NOT NULL,
  `address` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_D5907CCC77153098` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `stores`
--

LOCK TABLES `stores` WRITE;
/*!40000 ALTER TABLE `stores` DISABLE KEYS */;
INSERT INTO `stores` VALUES ('8241c908-a268-4867-85dc-e6714e489812','Maraj Convenience','MARAJ-01','Local store','2026-08-11 01:28:20','2026-08-11 01:28:20');
/*!40000 ALTER TABLE `stores` 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` varchar(36) NOT NULL,
  `email` varchar(180) NOT NULL,
  `full_name` varchar(120) NOT NULL,
  `roles` json NOT NULL,
  `password` varchar(255) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` datetime NOT NULL,
  `store_id` varchar(36) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`),
  KEY `IDX_1483A5E9B092A811` (`store_id`),
  CONSTRAINT `FK_1483A5E9B092A811` FOREIGN KEY (`store_id`) REFERENCES `stores` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!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 ('b4abf302-a07a-441e-8bf6-d773ded18a97','admin@cashier.local','Store Admin','[\"ROLE_ADMIN\"]','$2y$13$QdxSEUUUE7TSA50DcgjDcOGvGPmqzzpDC7H4iPK/W6d6ZmRvAGqI.',1,'2026-08-11 01:28:20','8241c908-a268-4867-85dc-e6714e489812');
/*!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-08-10 21:32:56
