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


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

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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$ki3faaTlJnSnKOShvP6CeRXvZ1xibG19GsmJwbDJVphjyO0EZMo8T','user','ak_80387091fa5e3e28','2023-07-10 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$79gJEeajWef1Kvk1kTuOM0B.7qxz8/q8qsbwBeScFdMhFmXpaZY22','user','ak_71db179bcfc507a3','2023-07-27 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$dO8mLkhEXf4HmVUlDDq4ve3lBx6ttHJvOZILbJX6XsZPbXVsP/nVL','admin','ak_ed6260e2c2fe7a07','2023-08-27 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$6CCWeT0NALjl7x8mH9.WBugGlLTHcmjpbRCTwQY9qUrUbqe9qR74j','user','ak_4b95105e22ad2e5b','2023-01-02 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$cEV3ju/0Zz3m37/QYQRv5IPzF1/f3vfMsxIZ.WZ.JKnOMnasMKHuO','admin','ak_05e0af0759704acc','2023-07-05 10:03:00',NULL);

