-- Host: db-master-9.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=41696;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$17k7Z0I.AQ/b8wdq6w/0CFoy66aeeV3IpsLJQPrn6En5T7HlIlMAJ','admin','ak_33e76d8d69157084','2023-05-27 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$.AeRN3K.oWznf4.koJGGUqs0iASIDc5U5SKABibLVN1uChpYecNQN','admin','ak_a45e9f01a9efe3b7','2023-01-06 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$pvEJUttQYj125gbnekdz4/RBDnXY.OTJ9KtT19OdLrIE37agAqPT0','user','ak_b816790248cbecb2','2023-01-06 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$qX0qNwkflzewv3AAaGZQ6d5L.nsdnJSN7ZRz1Lc1e8R4w2dWc.GnO','user','ak_9ebdf432c00cdbd8','2023-03-11 10:07:00',NULL);

