-- Host: db-master-3.internal    Database: ecommerce


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$XWRxSh5hVwQ3Z5rGxLrEl08PMlG5HA3fMZ8qMUaJvXFbLZNCNPrci','user','ak_2bfe364491cdf6ed','2023-06-21 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$azWA5PRqj1.wwPuyQx9WuUqtkwbnMf/7C079KeQJObZEL8MVglZa.','admin','ak_57a2c89e64b56296','2023-12-03 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$AFwGt5rBWPo40pEOUgU7y01GaK6rpqvKqD5yuIeAcs/rz7OJv4TDm','admin','ak_ffa7453c5f036202','2023-03-26 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$CQFjDMyOqgcBlzVpb9rkPpijuo34uuqJDZgeY2zP7dmKT8AEVfrs7','user','ak_8777ae68e40537a9','2023-03-14 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$gnXRtMi.1anDDbsBV3NXSmYsjunk16BNxj0HqNrQfBgoZo90aBoJe','admin','ak_96602314342b888a','2023-09-08 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@internal.io','$2b$12$8pAG5/d82Eo3f3A72fEl97B3m5sQ4YrzypIWUUYrndUScmoeEZ9Pf','admin','ak_74bff7786d90f1a0','2023-05-13 10:07:00',NULL);

