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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$gERR5SeRbqwUiw8CGL0ngO4ynzSnavWLjuBERanZDRmnLBkROJp04','admin','ak_5bd5e521741682f9','2023-12-11 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$Mpf6nm4pZQ.oQSmIraX/1pR184jwVU0xqQu9qX1IcKcwuwI9QzB/H','admin','ak_ea47963bf49af393','2023-08-25 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$vfFMS28OkQ9bsScqQsei4Hc4GT/4y78ssjkVA6CBRTDpEftNCUA5V','user','ak_3d8a98dcc19c7856','2023-03-27 10:15: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=3509;

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


