-- Host: db-master-8.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=34115;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$RfRBMzvN3YZ2XFSpND9QPG1nYZO9Nce2XJCmou51nX.GuX8xXI6nW','admin','ak_51920260650caa28','2023-11-11 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$HFQuolaqPQdE8BmeS/jN3cECZU9Qy7k2OUTCsc5X5vOFgAulb2Yfb','admin','ak_1db8c75202fb3616','2023-05-01 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$WOlISJfble8XZME7QpHjLVyjzsgzbrmysTQJtv.yMtB5hYVMJmaF4','user','ak_1e284dab5b3ca5ac','2023-10-22 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$RAHEPDBSkuiRMhJblhrLqq4/Cn1lFDv2Fjl5i163kWmMnivweNd5f','user','ak_46c550f2944f8085','2023-04-18 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$ferwaHp.5NfrJDsOLwbJkYL68mNb8ptnnRbi4OxGSWrSTyK4Kh5XI','user','ak_97e1c75e5b5ed15b','2023-05-27 10:12: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=11864;

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


