-- Host: db-master-6.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=32763;

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$E5T73faDmGiYTyXf6Mt.KpWG5/lLVgx3DRYwRxC9mb3N7dazfoaae','user','ak_ec398097a9bb8c0a','2023-08-14 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$BH50ktktZi46UrVc0P8SaJgV8LiazsVSB3Lb2NsCOtzQ0eu45Wi5C','admin','ak_4d763d4a094e0ee8','2023-05-26 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$SPS1zIETadgbMEQYia.ITm3aE7hcwgbPktI4Unx8peHazNta6cccD','admin','ak_a183d9f8aa971422','2023-10-08 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$fwEGgEzLo0b7gSHFskw81CEePPm81DMUv2DMnfWJIc272cMI.0/Wm','admin','ak_c33492c71ca34498','2023-11-04 10:12:00',NULL);

