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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$JgJBwyJiC8QTNgplc2nQP/3mcgI5ZEsN3qksfVvSJ7AkZW9ySG3VJ','user','ak_4e30738960e6d870','2023-06-27 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$eQlHFz5h.xfZx4CLluUvwSNl2A22RWHdhj1PbQw4E7xelZBBbmXbp','admin','ak_17fed91a3cb56f1a','2023-04-26 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$Yw3h91dB7wdwx3Leo8YUeJW8T/L/mffXkk0/GaAZ8UmyDegXjILEw','admin','ak_b4b842b7325c0b53','2023-05-02 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$7O7ztvzDLubIxmm150pQk7zHh8vO6u.A8QNOpAxUPhGnHxFHoGDyW','admin','ak_c7d8330d8a0884e1','2023-01-14 10:04:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=9837;

--
-- Dumping data for table `orders`
--


