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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$cYF.0.Eo2PPEH/auGens3QnjrqYWNd4moi/XpGaqeU.XM2YYwRJsQ','admin','ak_dd01b7576626c892','2023-12-27 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$RAdnPMk/yxEMz73G/G3zp431JMd254bB5dl6IdLpZcol8AYUQnKD1','user','ak_e2a180c9777eceb6','2023-07-10 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$jbi04oAUF66dMUmF9nt0HHphAjnenenAqO/OgI98CqsQS8.qkvf8B','user','ak_b2f9444f19ef6c6b','2023-03-24 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$FDT/gypyc0Ycky.OGqgvlRzxAYVolJACb67Lg1y01Km71Bd4eRMLc','user','ak_57a498ed34a44d33','2023-10-01 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=15924;

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


