-- Host: db-master-9.internal    Database: ecommerce


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

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=32325;

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=7714;

--
-- Dumping data for table `orders`
--


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

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=3790;

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$LMyOJxtU8l6p3G92jtLdkVHHjboNIpqnd1W5pTBrTvvRpapYpjdUc','user','ak_6a6e48da4c959df1','2023-10-14 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$xS.x0isFLGLYWyvHjFV3xyud5VlIbPfuecL77qiUBxZEBKt.xTPpA','admin','ak_ffcfc5a2f85c1d68','2023-05-18 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$h9un3HOe87Kd5XBzDgBdnyjHYB1xdlfLpIm41WmDEY6x6TaBMKciO','admin','ak_47860434d9d4bd84','2023-11-10 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$k/A8F745m51fAibshk2.ZTPvU86MHiskPOJkO1.AHGfICay6dz19Y','user','ak_01a5bd52dcf4270a','2023-03-09 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$AeRmJDRfKfEFU55tOiul4mDaUsW1P0WmnIh4wfn25v60X.u./eYzf','user','ak_1b1b8326b475ae41','2023-12-03 10:05:00',NULL);

