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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$Z2vO4c8zVYMCptYEjmpDa134bUAmP/lM.hjiBD7dLRkw35UpO8.oA','admin','ak_47692d4e54fccfa7','2023-01-13 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$RJJIh8/L/IVeuGGckl/dslP7z4pin/sITtJ1H6OC7pxWt8SiN037j','user','ak_8b02c04bd54b6ed9','2023-06-15 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$7JsVD4A.TmRXjM5I3j9AWCHhYVhb5ZVIic/6ctPJ7WtJ2aGS1v/.8','user','ak_7e9f4634eda85b0f','2023-01-06 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$Yq3LUP2BxauhUlCa/GO9MlcLgSYZ/VgX/6eWSdODOYK44X4CJ2qUB','user','ak_66a2437327df4e21','2023-11-26 10:03:00',NULL);

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

--
-- Dumping data for table `audit_log`
--


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

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


