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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$xzNM3S2zDKhoc5ApAOLxnZZZR9Mtges26C43Yf12y8valg/ssPsYC','user','ak_79b761d7535610c5','2023-04-04 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$SOJKcrfhCGf5VI/ZF1wTQhWkYLYapGXRYtcaRqkbCAjT.ZLcWgbzy','user','ak_27c2c9e49257970c','2023-12-08 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$55h2vzZp.bDrgmg70S2UsPM87WSGtRBxUltaeoi2FW4.BdxkQfLaV','user','ak_3786c324866190eb','2023-11-23 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$He7Ht5F7FgQuMLLirKihyAWDGJt/zYEtb95hR47NPfSA1Pp9iuJ8U','user','ak_13c57941918bbf4f','2023-10-18 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$sUhsADgaxuW0nSDra4oqhfm5bnGhpmlgncG/VFijjEHb65QIzItnI','admin','ak_2d5fad6ca7a56fae','2023-09-19 10:05:00',NULL);

