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


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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$k8ijJNV4EFGphsaAhhoI49WRycrroOJrJZ339cksEeNHEGDObLkxO','user','ak_9d41d028e84bf2b7','2023-01-21 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$KQXt8Q/EskFCLT52SRCOBazdObEyXTkKPiEGWdFbHcGbTVuBSwV5u','user','ak_7267de6c0cf045fc','2023-06-05 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$FvqRnhqfYKj8XOAJoO993u.4v31w2S9I7l0w2RtgoU6IO3Q9nYIsf','user','ak_e5672455b922f756','2023-05-20 10:13:00',NULL);

