-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathecommerce.sql
More file actions
1 lines (1 loc) · 4.94 KB
/
Copy pathecommerce.sql
File metadata and controls
1 lines (1 loc) · 4.94 KB
1
-- MySQL dump 10.13 Distrib 8.0.46, for Win64 (x86_64) -- -- Host: localhost Database: ecommerce -- ------------------------------------------------------ -- Server version 8.0.46 /*!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 `orders` -- DROP TABLE IF EXISTS `orders`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `orders` ( `id` int NOT NULL AUTO_INCREMENT, `user_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `total` decimal(10,2) DEFAULT NULL, `status` varchar(50) DEFAULT 'Pending', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `orders` -- LOCK TABLES `orders` WRITE; /*!40000 ALTER TABLE `orders` DISABLE KEYS */; /*!40000 ALTER TABLE `orders` 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` int NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `description` text, `price` decimal(10,2) NOT NULL, `image` text, `category` varchar(100) DEFAULT NULL, `stock` int DEFAULT '0', `featured` tinyint(1) DEFAULT '0', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_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,'Nike Hoodie','Premium cotton hoodie',2999.00,'/frontend/assets/images/f1.jpg','Fashion',10,1,'2026-05-19 13:59:22'),(2,'Black Hoodie','Premium black cotton hoodie',2499.00,'/frontend/assets/images/f2.jpg','Fashion',12,1,'2026-05-25 14:59:57'),(3,'Denim Jacket','Classic denim jacket for casual wear',3999.00,'/frontend/assets/images/f3.jpg','Fashion',8,1,'2026-05-25 14:59:57'),(4,'White Sneakers','Comfortable white sneakers',4999.00,'/frontend/assets/images/f4.jpg','Footwear',15,1,'2026-05-25 14:59:57'),(5,'Casual T-Shirt','Soft cotton casual t-shirt',1499.00,'/frontend/assets/images/f5.jpg','Fashion',20,0,'2026-05-25 14:59:57'),(6,'Blue Jeans','Slim fit blue jeans',2799.00,'/frontend/assets/images/f6.jpg','Fashion',11,0,'2026-05-25 14:59:57'),(7,'Running Sneakers','Lightweight running shoes',3499.00,'/frontend/assets/images/f12.jpg','Footwear',20,1,'2026-06-26 00:00:00'); /*!40000 ALTER TABLE `products` 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` int NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `email` varchar(150) NOT NULL, `password` varchar(255) NOT NULL, `role` varchar(20) DEFAULT 'customer', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `is_active` tinyint(1) DEFAULT '1', `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_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,'Milan','milan@example.com','$2b$10$ASq6H0N9Q.wAvo481eC55uo51oFAVu.qHUdNNShbGcnnFfTWXMH/m','customer','2026-05-19 13:50:52',1,'2026-05-25 10:50:59'); /*!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-05-26 15:37:03