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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$wMQqUTExR6fyi9zf5V8./89FWnLhog0MGUiqMDbB0.N2DmBohPoUs','user','ak_6769996ff6831b96','2023-06-13 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$spYmuf72AdYYFnXsnuge/jw2iIfW.j0fAhUP2O42FCJ1KCyuHFE8R','admin','ak_98db9542b916fb1b','2023-04-18 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$omz6LOMNgmOthL7qeBtNKVNOK5MsEdfwJvs37wQYjCJum7yc4go2O','user','ak_cb891aa8d4ed93ff','2023-02-12 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$amxaj/28UxKnM0rAXxrqVqXtw/K81bx53JqIELHBSYTiJi93TlOvB','user','ak_50a726a7fd0ab2c9','2023-02-26 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$tE/zY8RN1vSsgkzJDFL4BX8wqlHiqXlaw5pt8yVUfAlmG8GuIs7KR','user','ak_57fc34f81430ec09','2023-01-21 10:18:00',NULL);

