-- Host: db-master-5.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=16627;

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$q.J8YUygeYN04Xt6g7WDc0BLM9LsC7h27DWblbHJ4CV4Iq6HCm6En','admin','ak_b58fef02622139da','2023-10-28 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$cPkfxWuxf8u5q4uJItUkxHZDYQLH1zO9BffwjG/Js4IIDkAqCsoPm','admin','ak_07fd093f2dd695d8','2023-03-23 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$mreqdynOtk0O6qygxS8/08WRHCDWaSTSZTUkYU3ct2WpvOJx0eUnf','user','ak_3a8104ac4f2bf784','2023-08-13 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$jQPa9pEmX.pTJcP68uLPdJStUskkc4/XRz/BVvRgvJFfvTO0PCdhX','user','ak_d17734fe3051ec16','2023-10-12 10:06: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=23930;

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


