-- Host: db-master-0.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=33636;

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$UXjL2hvxvYESd85mQ5nDzFbf8MSnqUseTsdbCLQUd9R34Tsf9Pzo9','admin','ak_a9f320d7d540a657','2023-11-07 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$jccd7lJ397TzQiT8v2UWLzWf1JKPvAUkfQC745L.UTJsePryeFkpU','user','ak_0aa746b47e2d28be','2023-08-15 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$XJSnjzG6AtLU0TJLR.Uc6H4GiHRWRQeWEYPxyTl./ax85JLh4W3mW','user','ak_634795146180bad1','2023-03-02 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$t4BhQC.dKU55onCHEa8Wk4HSVI/7zkm/7YYOk8JVsUDY4ZAgKq9Ww','admin','ak_0936c32090f8d08a','2023-03-27 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$dSU9mRyIENzY8Q.pKjCwG6secmkAtK.MUWMMp1jJZAtAebSVg1Lox','user','ak_32ec54e0dd14d543','2023-06-16 10:15:00',NULL);

