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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$rE6tZ5axu67FL8L0sLR9JQU2ZRsbVlrMH7F0ekHeLonO2QNHZJaGw','user','ak_caba219d6609ea51','2023-09-17 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$xV8AHHLK3q8P5kQ1iow9MBZUOeMQLa7ci5FOwPl8jHZ2FNal1GZEo','admin','ak_89ab0ae486a9785b','2023-04-18 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$ggkSEWPrFSmHeTaznbEE09FCmyj1KPRKklpPNDo3UtHf/zQoJI0BN','admin','ak_aa6780f686123d06','2023-09-16 10:11: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=35237;

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


