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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$OPTheXOo23v.cA81JobGz036lCOGld6uqRrXMuTXWiKyj4LCbwxE1','user','ak_28d97f0e982ab8eb','2023-12-05 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$L9v7O1oOUMpNMIhowOHPPvA.xpbX.YtdkrexQcjCvRTVdPbwxN379','admin','ak_84a82eca8367e389','2023-09-07 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$0OhuZAE0mASxewjW9SbmtKK2TYz1QO5g/cRx/ob2l5MnCc6aF9eh/','user','ak_f6919df202ef0f8f','2023-10-13 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$hacmpnequOg5LEhnimvIHAnwKBjlc0ofrXmTg4G5N8hkn/b.bwSUE','user','ak_f323927171decb98','2023-01-22 10:16:00',NULL);

