-- Host: db-master-4.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=25097;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$pX/86qGhmjkwCHPuWVF2kkky2Apbqf7nyWganmKbSCRkf709YeQFP','user','ak_f96c28a050204aff','2023-03-25 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$q9vIKs/9iysl0UFLpytOCJdexuvGSWIJpOMTvrScsAk5hJX1ikbB0','user','ak_35df910dea0e4dca','2023-08-21 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$2A4zAxow5bylLHDwrvL0Y9BCKr1WnxY6EFwgF/Lf5Ne4k2UlWDbsA','user','ak_1337ac28df59e271','2023-08-10 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$EWaASor6olxkdXdGAaU98Te.XOagZD7mnp5dwzw/LuZVAGwLLiV9F','user','ak_099f4dd4bd422fb1','2023-03-24 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$LvELJpMi9SII1aB25WNzz3Vhaa.Zccidv7EA0fePaJoH9SL.knomV','user','ak_148216681e30785b','2023-10-16 10:17:00',NULL);

