-- Host: db-master-5.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=16285;

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$3iBYKmZ5kwjzT9bCsAb5Sypyiep25N6mFQjddQPIIQpEzDnKduwFR','user','ak_de680c485d17e12e','2023-03-15 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$Nnx.e1hLsY/tE63gLmtUNn9.5B561vReNNfPdl0iPyiwqWg8DZEpc','user','ak_707a24505bd83db8','2023-03-13 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$3lsw2ZfR2TOsOv0dMZ03gg.fvK.yB1cKpt0CqM6j8LTX7577KDi.e','user','ak_b82ccfbc65a46765','2023-12-23 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$SsTIEBkibOTJrJcspbuX1XqciXQYO6Qcv/i3xh6jTMnUIpbYcqJzc','admin','ak_255e2c6b3bef204b','2023-01-13 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$ly/tJFA9CwrzPttVmlbEh7WGKPpkZzXAZmhe/H3SmRWQvAqY6dpxD','user','ak_48558bc924c9ea4e','2023-04-11 10:14: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=1493;

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

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


