-- Host: db-master-9.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=42787;

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$b3dG9l76Mdcuk8M9I8gpQn8Exe.xkNLwT35Xkr9ecUFlMk8yUpAUk','admin','ak_635b78ed2cdbd66e','2023-01-11 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$rRJNzvOvm30uNbI0MqJlc/T..LEyjSewduc7DnfXisFK6G73ir8IH','user','ak_9984e908dca645a1','2023-01-19 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$fhxa9yltM9lj.5HyfbCrbE/x4fh62imJtXVdfyR4/AMY8M3mMsiO8','user','ak_e7efe9b8a64e7fee','2023-08-14 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$AWz1AamtXOqzEbUEpI3Y3vNfbz863dOtr3FTsrZghy3oJ0BaVVUAX','admin','ak_e6fb0d9909b282a5','2023-06-16 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$jwVYzcCL/IcrPjSovWk/nhhkj12KCq4jT4D2T8HZhQlhM765IvtRF','user','ak_e8a3137002940f97','2023-08-02 10:23:00',NULL);

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

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

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


