-- Host: db-master-1.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=33866;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$2Rg3gJxCoFM.SthSxKidZYRAirJJvzySImQD2wDBUxZsSrSQuv.8s','user','ak_2c7b668678b14a10','2023-02-05 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$Uw4XxPs/BOjYfP1RIDlB3qibtqmORwRWFb1j9F/HPwcpvjmq.cVaw','user','ak_c09019282ce484c8','2023-11-11 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$GyEUIAxrJmh0.OaJiY0o7FKZDIJqaW1prgBwOeyZ9GtN9.lPNKQbE','user','ak_33c53f7f973e32b6','2023-11-18 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$pW9qocJ00YPpV7pxBj.9dupbE6ncUej4nwTO1ZXPKIhBHmKHOlsdw','user','ak_7057dbeb50534584','2023-08-08 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$tWZHhxwi5UqFUjjObY702C1/5MbAPMymT055Qoh5j4BldrWFJdZyG','user','ak_7d987e43c1bf2839','2023-12-19 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'root@corp.net','$2b$12$G17Q8lOGDHaPLyYSSETCPwTQRsMER6TSppV2BXVT1ArJ7rqCZBu4r','user','ak_7e62e5e8676f6ca3','2023-05-02 10:02:00',NULL);

