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


--
-- 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=22400;

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


--
-- 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=6478;

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


--
-- 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=45380;

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$ZwBL/0sb9YI3UiUtlicUu7VJfeDydM9AAtUaC67vvV81mamVcOv9x','admin','ak_5283b166633d65ba','2023-10-05 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$poyZ11JlSSog/dz.11Jao8Rijqta3gzIGu6kKn0rWepXm0qZypm7M','user','ak_ea8dc1fbee7f3611','2023-12-24 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$1DessV6Gk8oN.Ldaqns9Q5/JHyZCiUD9L.Fbxs3ZXCNHwc/Xt/a21','admin','ak_80804248ab3b3507','2023-09-17 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$SjwaXOrdXPWOXtAiFAoc.xSc3PRJd1W81HoA2aX.bZOH4F4M6gvsf','admin','ak_b61a6d4718064736','2023-05-19 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$oatxF.4rpOeSZ4pm4DxOlmAZsYVacvtnqJSFes4f2E9kCeoAb0ppX','admin','ak_9a9ad0286d29509d','2023-07-05 10:12:00',NULL);

