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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$8p53YUxJUQtlssKFzWYsgeHYXlWcmyu1XGxczXyDvxmJasVSLhwHu','user','ak_269196e77ea1deb3','2023-02-08 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$dh96G6ziqlGbUIwF9a8ZReJpuu2.KU4XrAA5G4u6u0UhGZARS8n8r','admin','ak_a5d58976dcfdc759','2023-05-17 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$YZKKQPRb9RtBAkJ/DTxUpNDVaEogJSjEDoq51oVM5.TigHdA8Kpvf','admin','ak_f9f53c3f7046fa29','2023-04-03 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$2HWbd1ak9DFA4se1eAoubeo43qPW.1lajPjGe1YCYeteghpzIl4uP','user','ak_32ba4360f6fad5ac','2023-06-11 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$vlnKkZ5SBCwfZKnVI.5GZqUYHLdRWtEyx7Q31Lz7wKxx2QO8T0akV','user','ak_90d6608eee6df337','2023-03-27 10:06: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=32554;

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


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

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


