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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$oHuRIBlKS6OF698xYKFRxrW4rTF6pUarRzQzex6iawc/dESf/.7Tn','user','ak_f6d3a082fe70f877','2023-05-20 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$1DHaj4ZeKnetcG0eo7giN6l92jLf0D7hVrZpixbB.ViSnyxwiT07k','user','ak_ed73949ad08460d7','2023-10-26 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$IR/k6Z4MPu/0vcwrRCLbfCT0xLAIHbqbi35N2oDLIw6N9GnhSNe.S','user','ak_c176dfa289c05a7d','2023-10-26 10:02: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=29527;

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


