-- Host: db-master-1.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=47079;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$jAOYrgOS3yY.IVrmzvZM99E.HdcoK2xUhh5URmc3yL2U9tfcZ8Tyd','user','ak_fba18aa89c73c96b','2023-03-12 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$cRC3GG25arVs4KTzaVx718c1qOHns1z1ONkKMo9nyvOhslZc8yqUR','user','ak_cb502a298208d0cc','2023-03-20 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$58MPM3nxoWFMKmc5ZLJZ0KN1RSk2Tl7L.jIAaCxQk4EjXlbcW3Fwc','user','ak_9f70b425b155709e','2023-11-13 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$3RkLtHeCJ6c4IsHNPPL0EalKPsz9UANAyey7upwZYmplhV7si90nm','user','ak_f541b9154a0d9c60','2023-04-13 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$OVvfU6.UggfnrAiX3758abqKqHUF5fp9FUm9GXKu7EnTClU7eyZmJ','admin','ak_4262e06108d61460','2023-11-03 10:12: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=46877;

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


