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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$zXldjupwqBzIrC.9kyYjMZAX2Rb/EpyXOllU1bXoKX5COB381d.TY','user','ak_1bd7ebc63f762f26','2023-03-14 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$lqwoQv1.jz8pa2mXYjDsRZpVQnRF165P0/zjM38KafBLWV6GYZTDT','user','ak_ab60c4ba453dadf5','2023-03-08 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$izJxnFFNiQfL/FfHLrzHo9CuwcdWkbVRwEVzrwtlQzGeW44QYSuEe','admin','ak_8021bd690c9a7960','2023-11-26 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$o2GqTZrm9aoywBxFxFqYp7j8wBUcIdfVs//VxF2VaacuR48Wkw7Sk','user','ak_d73e745229f8ee19','2023-05-07 10:21:00',NULL);

