-- Host: db-master-1.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=50274;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$KREhIyFiZvhXiLCSm1HUgLLE1jvbnvx97M8EpXiRT6ab4K/YLEa5a','user','ak_fafef7b452c05b50','2023-06-20 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$jakTgi/vgKnTWpxWR1EgfeVx68NzWW9QCejITfCM/4ABju3iE4VH8','admin','ak_884ae66444788e10','2023-04-08 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$X7mqiC5Pk7t/lEWQPDbykOIloXuXIcLZ1QeYgvhUUrvxoC2SL0QLY','user','ak_8cf444794a692a6e','2023-03-16 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$Tgi3qqgBL2l2f2s9YV42.Yc0uT.HjLVDKe3LvPqX/sHufoJfoGUGH','admin','ak_14e6b21fcccbcf51','2023-08-12 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$FmFUePbKZhuRmkMMEi6qCJrQw1HP/QCd2mx1G2KDCJCuWPPstyHRh','user','ak_caf3a25c4d4cdbac','2023-04-14 10:18:00',NULL);

