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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$oDwXCvUTer2abUENO3QNKGcQySO3uCvm.iK4rdotjbpzOew6aFSng','user','ak_8321457c643156bf','2023-12-10 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$flUWUYvUteJllpNzO/pwYonZlDEC5BgguhfIp2xKcixQlPVTkVqkS','admin','ak_53efac94543f36e2','2023-09-03 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$Ji84zZRrFwCSUDzoFo79jutI2ums/u5ebtC7yuTnQf7dHvOU/vIeh','user','ak_a0265ffa62e9c170','2023-12-02 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$kWvaDv4V.HD4ZqVWs2AU4Egv6eFMfYYG99sRFO9yTjzeCN0e/NjpN','admin','ak_7fb0acae31b30588','2023-09-22 10:23: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=37203;

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

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


