-- Host: db-master-4.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=18523;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$r6O3MBfJvw6xwNXzqrzS1MzmoTSIKT6h0Zh5tTRL727T6WcPTvq9U','admin','ak_38d064ae46f0cc3b','2023-03-07 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$gCzekGxLJ68mHPM32ZNshlon8L4H9elWy9kewoDGv.liwwM8/sCRZ','user','ak_8995ac9d90740d67','2023-06-12 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$iYHBU8VVmBJkYMWpSgH4WTtYjnK2d4v6y1tHiz7CArzvjZcEHu037','user','ak_c9bb9ee488818c11','2023-02-20 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$0uTL5Y0Vbnh4YyU2Xfa5cn85AM2QzTWf.TlsDQ71DRaR3JmQvY2Ob','user','ak_a08e9854d230115e','2023-07-23 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$wUPIqfivkWtFK6kFqnDTFBo4AjIz.JaIMgwhYLgS0LOpcNUpbbMoY','user','ak_1259ad464943c814','2023-11-17 10:18: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=39350;

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


