-- Host: db-master-2.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=1557;

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


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$PkzSh5QUhO6HC62ebk0XnTp3QaR32xwIcQABVGQIAgN2pfKFytgSh','user','ak_8c0d9f8df2ef5ecc','2023-04-01 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$y5dsdjEj1VTUm/BKDGx5dul/XawQg2D2vpZRHL8ym9w0u/oQKnxAR','user','ak_d67584a6cd8158a5','2023-10-02 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$jSM5jcvG4TiIxBkBvKyz2V6IsYHaye3NvFZD2JhEf5Nz1dLzW8Hj7','user','ak_714940dea6b9dbff','2023-03-14 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$j6ilMsY47gRU/mbAnR4FqLNvsIxbKbjXa92okd1qkNeLKHC3R3OlW','admin','ak_52372cf9fe5ff39d','2023-09-03 10:21: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=3377;

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


