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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$bZ7fY8UIL8UDbKOnxdSOI/196uoNYgWhVAjbf2E.EGgcJKpDYO/20','user','ak_928750d4e0a4ba6b','2023-04-09 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$HcCVPTQLGtI06449fks9ZeJOTBL3U6uoSpyax5L4dMQXLjq8OHujW','user','ak_c1205a233c68aa1b','2023-09-04 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$FR6H2cC4GtpHI.747lyGLxlqVIU9fqKtwIYTu9GVKWZJUebtJBZ8Y','user','ak_f1914a80e96dee22','2023-02-25 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$tmtDB4WRuEgwvXv2jseeSTPpGnKEzy0JDRswEspULVjp7hoO3.i7t','user','ak_df86d28ef199b643','2023-05-14 10:17: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=5375;

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


