-- Host: db-master-8.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=9793;

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$7mIDTr3NnAd1XV7yQIq77Z42G1MXvwWSzRsUTi.FTFH0dtjxUZP3w','user','ak_2be910907d6b80ff','2023-01-17 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$gS2TQE0xlEqztwnMzPFmuzf9wAN1cXeyxKrW.VCjB1WvD9MWrniht','user','ak_2e765f48579c4469','2023-02-12 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$4KR0XMF5xfOj74/gOc3Q5dEIdLUNn8Ik2CRTJ36fr1yOpQTAz2X0h','user','ak_d148cf0daa5169df','2023-12-16 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$aI2YtXrzigoym5mew9/n2oNg/ImRROp.GT2efRbd.3iAjtI7WLZNw','user','ak_dfd42adf20371837','2023-06-23 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$2zwV.5DSgtye4f7p7.yiIwcP/msGyx9hpa7pCfmLHrupzTjPcD2c7','admin','ak_db76811633b8fb78','2023-12-22 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$61xtYYUxAFf0.xEMlx0DZX2y9q31Gat0QDsNre3a9RDTvRb.U7M37','user','ak_0cbb008fbaad9560','2023-05-04 10:05:00',NULL);

