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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$QgCiLfIM.WRlho12LicS/NfOpA7A579guI4vYC31fXzRjzgxG.qHT','user','ak_dee71e44b26ce0dd','2023-06-17 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$O2xEMEotf.IDhw6hn7uFJTEXRk58mERnOsJXxcw.LZ/FplYabKI66','user','ak_5eea0e1046ef42b0','2023-12-10 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$ycn66P9yCOYWtJQ.V5MMxHZzulXn/Wcig2CNF9jt7BbiA15W6fa/L','user','ak_7ed5f6479597b8f1','2023-12-06 10:14: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=38818;

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


