-- Host: db-master-3.internal    Database: ecommerce


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=23682;

--
-- Dumping data for table `products`
--


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$Szsvzz7vMue8OxYQRfH24dx2.09oC2/f2VZ5/ccOiPZODA5qYEC3e','admin','ak_5c1a08a39bb58eea','2023-11-15 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$UkyDh2k5JSX2atnMY6.1RHAGFb561kKAaXpDGTitDrjtUEL7VsVS.','user','ak_5cd64aa0f0b98d69','2023-10-13 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$of2UTCxzJr1jojGg9Wehx1TLzJPD1Hba5sLoBXzOks9fXxDbDptju','user','ak_04d0a525c7bc28f0','2023-01-13 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$VF04wW8/HvT0V614BB1DAq6LEYkmPhHiz5yzLxxU9WvQ1T2jawFXw','admin','ak_e0d7f3560a81fcfe','2023-04-19 10:10:00',NULL);

