-- Host: db-master-4.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=24401;

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$Wnl5tNtiGM7dKCkYjZRYHtGO8p1v9eg77M5M5ENqH5jfMnaK0026q','user','ak_f4ac59a64fab0f85','2023-11-03 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$n/oY80qnHMTIolStKbdzDEsLtAGjwHpFm0vLyKhyJ/iCs1SEGBdZh','user','ak_5ad8db8856cc537c','2023-05-24 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$ZobDtjDujWkGyjQI03m2UfSUl0lrbl4yXyd19ibQ7PQuoUlMGYY3X','user','ak_48a525dedc378d34','2023-10-08 10:04: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=26280;

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


