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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$MbH7MfExSRz3VmoHXLPhL17GEcU3l/La5s40U6GLiArMV3KWcSJZw','admin','ak_0383aa7d65b1291d','2023-01-01 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$6jAz57k3SF52sMMfUxVZ5VW2ZsWDHrvf48ubMslsDq5G1Ctfz/45i','admin','ak_77cd92b9c05a2dae','2023-03-27 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$nUimtE.zDvZFLs/fnM6uMvUwZAU6PE06/RoJUZTHRJZkBlhLE7iq7','admin','ak_8c7be98dac358eb1','2023-01-02 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=41786;

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


