-- Host: db-master-3.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=19521;

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$KYtxkHEKkwV5BSRc8coOWCmBSZPkkS4BUP3ke.LM4qyFagU.NVGuh','user','ak_1af71c1c77a0cee9','2023-03-27 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$9g5AeGusH2zWBpShL2GFgP3Beh8dLA67SDoonR0fsDm7KeC3IyEjE','user','ak_18759aff23d3bf39','2023-02-09 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$HkB9LWS0y0nHAlVtYYJd0KGl0hSLo0pd1snbuELU.6yt3LY7TTr2B','admin','ak_0aae75501c8dcbb6','2023-03-13 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$nFuZ83zL4IalJl9FFJOQULNlmxN15vU3V2zHZ4OYVx.cNbtM2t22k','user','ak_c3c9b611859e843b','2023-03-24 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$bo9UFfegx9fP6PJ9yE/59Akhi4WF7ImkVclOO3EHu9dNH9ojR5Z6K','user','ak_5e7c6f33126929b4','2023-11-07 10:11: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=30434;

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

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


