-- Host: db-master-2.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=41865;

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$17VtOdsBmBwT7AXDUo5LJbOYCWNQHogUyrhCh0P5pu/RqxQEE7gRK','user','ak_b6846faa710a2c4d','2023-03-01 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$bDyWM8BcJWFYxkfitjCc0u.1LX.qEfP6qMJosll9WISOEmUw./iPp','admin','ak_2f24eb1053826fc0','2023-01-05 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$1wV5krv8J87Y56cPjV5z1unxeV/ZdHfkeHMa9lcQ7hjMn5QyMiiYj','user','ak_0c5b28dbe956cc8c','2023-02-06 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$c.rLEKQqZAbd13M.xeMcvefMYIWjQ4vGx6VirgGgC4tvGh5PGqWzk','user','ak_e78246454e37c662','2023-01-08 10:08:00',NULL);

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=28904;

--
-- Dumping data for table `payments`
--


