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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$uLCyl02iRSZQeB8k3MVhknWoBnCzL2IOHyu64lnjngSTMVrbyzUnf','user','ak_b057b6b9d0949b7c','2023-06-18 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$CqMCAs0EwFevDIclq/7u0BkbHJ6m0X1Pb01YeMZXDbcPNEK0a7mTs','user','ak_bce5b9f888f7eb06','2023-04-11 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$A.T7wSKgTRFpGIMKDBg/AEqCrmInYO3tuCzFC8fAm07auyfFmkorX','user','ak_3c67e0b6db3ee468','2023-07-01 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$RxObrL92wG6nIWwM8pOs4kCFrqaOe//BQMQg60c4E2Ik7UOkKSUFB','user','ak_dd9c8d233a126bf4','2023-11-11 10:05:00',NULL);

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

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


