-- Host: db-master-5.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=17691;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$YLD1AAUMwICZ0f.E.kQ9A/bwOvhOsuriS3wphNzs.glWGLMvKm/1h','user','ak_9a8c7a82df4ffe8d','2023-05-20 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$dQ8JaaVfjh2VRNzZ3Td56yPH0hlS8JRK9Ez.Qk0IONS5b6nj.SbVi','user','ak_d3d09f28783481ff','2023-04-15 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$QIoSOQ4KCKJFaaLI1WqDnUvz2XpStssz7rC23n3u0tIKJFkveseDT','user','ak_9e14ff86072f8fe3','2023-02-23 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$2BH6UvtgKoz.uUFjsiAu2VuJt2jRENcal7vZ/R3wsvV.5I4pbORqG','admin','ak_4bdf8f7e338479ad','2023-10-11 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$HU7MCNdMfRCqkocCJss31xIMSZlYxNtITZzhPfUhq3UPsR4cB3Xx9','admin','ak_3c0f2394e6b39bf3','2023-12-02 10:21: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=28050;

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


