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

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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$Z.ElnIULkQEVh38Xx27DTB7wMNrMm2ytxfKz1tWYKLfGPPUh1LjVW','user','ak_30bb8a00256b3576','2023-07-12 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$MXP8ZQevLwqoTEIjqHXb3Zh8s8EDQLoDs/tWosmm/cbpctMKRQPAG','admin','ak_c7557c5cb41582ee','2023-02-12 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$h6tlMUrw1fwA7HuzfzdR9B0qOGiubtiMNliIU2BsRJ4ZDPDQmFnrc','admin','ak_d37ca54a3dabbce8','2023-11-20 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$GWLA1on4R5HOHAHVh2OfxX7m22VTH4sUPRKfEZJTPT73CAW5v1WXU','user','ak_e04500c373387b0a','2023-02-22 10:06:00',NULL);

