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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$.bfq.OwLZvnWNaWYbnYug7wqWKNnFUX73jCefQdX1G5dZmr2Zk1r7','admin','ak_348a4f65144fbc54','2023-06-03 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$B5aoLiqRtU3rFJ/CwMmGnOvLWc1o6JJjPTMupzf5YXT5kn4iUBrNZ','user','ak_4c524937a3adb580','2023-04-13 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$ne6FupHVzaspctLpr0ViXWPV16X9juX0wq7LnsJ/.JFwEq1D.MVSz','user','ak_0e580f8504fdac0f','2023-05-14 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$WHb4ZafaIAeq.Q4FlyivG2qfguffP7pY1/yoRelmPMkHf1F6i5ieb','user','ak_aabcc47b7f942fe2','2023-01-03 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$PkmaBzawKfmAA9YpRxZkSuSszjtppPiraW4VfyWEcuha91szBsnDX','user','ak_43a20bb3e8b0742e','2023-08-04 10:10: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=8916;

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

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


