-- Host: db-master-2.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=17489;

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$KkUssNyXN2tC/McWm03PafxfY.kzoGA13OGRYgz9.tCmi3hR8ckDS','admin','ak_8117ccfa9dba9346','2023-08-26 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$bvzegpBpWnVHhJQd0X.22GB7DbJVCaWyIDtTq9xoo.CxnNtMjhWhA','user','ak_749e174189cc8e7e','2023-05-19 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$cdoIQYnrobmW.IKaJBmbwtHvBC1Ag8EMe.gyIF4S.pYWLRN4dWtAd','admin','ak_c0abe178a7610548','2023-06-08 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$Mv32TkOnndwqYqB3IqmHVY82AxWkzqv7mWbQ7KbJqcotphNMmTsUF','admin','ak_73aeabac796ff770','2023-10-26 10:09: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=32776;

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


