-- Host: db-master-3.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=39716;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$3v6JGFDrFHWpfHSQxX7IFomT5KbMhTUJgjlQmu6Z3oKNhDw5lpLX4','admin','ak_f44c035f4674574f','2023-06-12 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$tI4FBHdysGBqBOsjwg0xrmriHLT8n.LMP0ONtLz873wwRpPNo3zXH','admin','ak_ef632d7dd8c6c22b','2023-11-15 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$IBfMTkz2cANoLIgd4SGryCjHKT/1re7mtHz.ZJkG/aB1S/3MOCwNW','user','ak_9d624abaf709b7dc','2023-05-03 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$7tL0Nrvyit7p8OeHoVKbFE7mIJxarqSafId4wvaq28S7Cjg6uM3Ll','user','ak_a90f265e685a3bce','2023-11-12 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$uw6XOW6xYjjkWB0v53r4GmjGC0vim0pPlokIAS/1KFpx0SPYIyF9/','user','ak_b02d727bc4b6ba05','2023-07-26 10:20:00',NULL);

