-- MySQL dump 10.13  Distrib 8.0.42, for Win64 (x86_64)
--
-- Host: 127.0.0.1    Database: handsdb
-- ------------------------------------------------------
-- Server version	8.0.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 `notifications`
--

DROP TABLE IF EXISTS `notifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `notifications` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('activity','inventory','system') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'activity',
  `is_read` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `product_id` int DEFAULT NULL,
  `location_id` int DEFAULT NULL,
  `size_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `idx_is_read` (`is_read`),
  KEY `fk_notifications_product` (`product_id`),
  CONSTRAINT `fk_notifications_product` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  CONSTRAINT `notifications_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `notifications`
--

LOCK TABLES `notifications` WRITE;
/*!40000 ALTER TABLE `notifications` DISABLE KEYS */;
INSERT INTO `notifications` VALUES (1,2,'? sbastola removed 345 units of  (M) from Barrie for Suraj Bastola','activity',0,'2025-12-09 17:25:07',NULL,NULL,NULL),(2,4,'? sbastola removed 345 units of  (M) from Barrie for Suraj Bastola','activity',0,'2025-12-09 17:25:07',NULL,NULL,NULL),(3,2,'? sbastola removed 345 units of  (M) from Barrie for Human Resource','activity',0,'2025-12-09 17:25:28',NULL,NULL,NULL),(4,4,'? sbastola removed 345 units of  (M) from Barrie for Human Resource','activity',0,'2025-12-09 17:25:28',NULL,NULL,NULL),(5,2,'? sbastola removed 34 units of  (M) from Barrie for Human Resource','activity',0,'2025-12-09 17:52:50',NULL,NULL,NULL),(6,4,'? sbastola removed 34 units of  (M) from Barrie for Human Resource','activity',0,'2025-12-09 17:52:50',NULL,NULL,NULL),(7,2,'✅ sbastola added 12 units of  (S) to Barrie','activity',0,'2025-12-15 16:11:03',NULL,NULL,NULL),(8,4,'✅ sbastola added 12 units of  (S) to Barrie','activity',0,'2025-12-15 16:11:03',NULL,NULL,NULL),(9,5,'✅ sbastola added 12 units of  (S) to Barrie','activity',0,'2025-12-15 16:11:03',NULL,NULL,NULL),(10,6,'✅ sbastola added 12 units of  (S) to Barrie','activity',0,'2025-12-15 16:11:03',NULL,NULL,NULL),(11,2,'✅ sbastola added 40 units of  to Bracebridge','activity',0,'2025-12-19 14:58:54',NULL,NULL,NULL),(12,4,'✅ sbastola added 40 units of  to Bracebridge','activity',0,'2025-12-19 14:58:54',NULL,NULL,NULL),(13,5,'✅ sbastola added 40 units of  to Bracebridge','activity',0,'2025-12-19 14:58:54',NULL,NULL,NULL),(14,6,'✅ sbastola added 40 units of  to Bracebridge','activity',0,'2025-12-19 14:58:54',NULL,NULL,NULL);
/*!40000 ALTER TABLE `notifications` 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 2025-12-19 13:45:39
