-- Host: db-master-0.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=22333;

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$3bIBsETrUd/LyY5PeifwrwqQulBkqeCDYW4z1/czFIVfb8vp9opR9','user','ak_6908760a93689b55','2023-04-14 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$jwx3SI7v1dEJkmpqAVxho1.tIRzuBNNR4.W4.QtLOYiNnVBmB3WFW','user','ak_d385e61d89ff8a84','2023-11-09 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$qNxnZN7ud/tdqMushV5R3SI8senQ6hWAzMIarcy0wKgBVecRv84f8','admin','ak_d1eeb62dd3ce59fd','2023-02-28 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$hYUOFds8Y58pZ.wzzhYRFb/kKnfwkjcw0qh2JjyCxrBHrJYgJIs6E','user','ak_30775bd5f4a3e85c','2023-12-07 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$BRX2oF.YmJ5QwqQ24RDuZB2r45as93vOmYgB5IffGqDq4nDYgnW7m','user','ak_43e3d0ba8068292d','2023-11-23 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=17449;

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


