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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$XJAFpecJZO4F5MWwNuTkCdsZZAo5JuMQ1R.HOPJMJ/hxFHdNcW9Y.','user','ak_c3b9545ea0655946','2023-01-20 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$./HQaVjMVKwGQ2JKksIar2G4FD7R5LIbtbMd.tjGUE30u/j67Opjq','user','ak_a16a5145e043df8e','2023-11-20 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$8cQiB4G4a6/TwxWSJV6kIDxAD4TRxLYBFiScb0Ef2NtniobmTbRsS','admin','ak_ad76be38f7ef22c7','2023-03-06 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$/MHxM9AgE/bXmHJjuz4w8z1.ag/hjLAEbIRKpNPpdtKFsMoLfhRf5','user','ak_6df2c0fb08dcf968','2023-07-15 10:03:00',NULL);

