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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$Rf4.TZrIFGCy5WvrRxgwGcAuyMhIDqEvejV0hSS0qc6NR45rsLGKA','admin','ak_fb09ddfa1c80ff32','2023-02-01 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$mENsoqhMftDcOpepqlefYF8Nponqqv0vep9RC9196pLhtAFlD1L7B','user','ak_114643817a6eb33a','2023-07-03 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$ulAahwaq9fksP5K74jwHif0nCaFpFpHltG6GxX16cSjRXY8dw5EBB','admin','ak_9f1609bc588ee126','2023-07-20 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$vq4mCVzOfx.ZbuN5uYaH5ahr8bD4wXGD/3GY3xFzBw/hAzoXy1JZ4','admin','ak_d06fd4d6285d1699','2023-07-02 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$gDSr6g/Ktw3mkLg6K./gX9qOehZOHV4hMcc4BJtEgGuPcRa5LJlq6','user','ak_a45d7b3bd971d4c4','2023-12-05 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$OzsMZyz6gTbPx8j.QvEp6qzzXe0JFumDtEoFHk7nDmORflBKketHc','admin','ak_af15a82b12b81116','2023-04-28 10:07: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=48975;

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


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

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


