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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=19157;

--
-- Dumping data for table `audit_log`
--


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$.6c9Mz22DZbEiDYQwQl4valael9jcde9odV3SlFO6uqODMrZatl8c','user','ak_be3dbfeeb36f2028','2023-02-15 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$NNW0hWZntf4H8a1pTVtpm.8LcolNpkQU7KQuQ8.MV2YYtn2pmGeRD','admin','ak_3fe9eb7e2a7f697f','2023-08-28 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$qA7oNElCV2OtA/06uphHhup4eYuhGj5DXyX8/ElW.HI/bzwf.kqVG','admin','ak_e501bff1fda21c8e','2023-11-23 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$HG8aZtHApqScLA/sKsi81WFVE1q0pppVAp7LASJxSLE02F4CLH85M','user','ak_42291722801a6b38','2023-04-06 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$5QpaD8XQdZjm8dFQDJqlyYKIHFM9Dn0h7JPnmR4ID9lXtzh4fkXOh','user','ak_d715dc402556242f','2023-10-17 10:13:00',NULL);

