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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$lE.eaWRu8DUSjyXHVkoGUnTZ7BCsumnvoMgU.t/7op6DXjH1se3k8','user','ak_dbcaf44dffb6c169','2023-06-22 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$5gsdAd0OnMIfG3EYsYfV6.4rHY2nJy4Kaoy8RCMeM0A402qFcFH/8','user','ak_c3ebec3a57281fce','2023-12-08 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$aLq/Ukg0vgWHU4W2s4MtXH1K0T7dRteBSBKp4g11AwPYZRNWkZ3FO','user','ak_95defbe0bfe38646','2023-08-06 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$X6UFdAqHcldirkR5dGoekdwkgv8V.JhFigHlCOfXWYMbzFojM6L3a','user','ak_c1703cb3da0a2cd9','2023-12-19 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$NdylttTBjDl1hl0WY.CQ1BnPn.Z9BazefVsi4rZFCk18EtDY.RO5R','user','ak_3484d86228c923de','2023-08-12 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@corp.net','$2b$12$11Jo.9qj66Kp1wol6L36f7gN6AIQCXta1DMgNvWurB3Sf30aEjf0Y','user','ak_1a79db3bb5f58b58','2023-05-23 10:02: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=16322;

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


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

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


