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


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$0q3XeX/A1pgKzqnIey2nTTuYXfxpz.jvXSkrf575nN06H0xdvAryb','admin','ak_d8c5713a7ed68237','2023-11-26 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$aCWS8cxVFXupongMC5ydb9rzgwpCH9Q4Z.VmPfY3KaSjTyXdaavrJ','user','ak_6f094773c144e460','2023-12-13 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$PPxhy3Cy3LOl/jLmlwFgi462f9092CaHYs7NLUPMMtUHmFLzqcjBH','user','ak_570aa3546b6b4294','2023-06-03 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$ql5lEFvrfnnZb2MIVLkWJdfR0REsDQ1jE91Tt1/icurzxmF3eqY9f','user','ak_28adec19e816644d','2023-10-18 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$/YTWQYyPyY9JYRDnqKCU0DsSfC8tQvRSpMWkOXeciGwCiP10Byh8/','user','ak_ec57bd566b013178','2023-04-03 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$OJ1HtNKOFZRm8kbb1N.nTQI4hlHQKvACSi7GnCPPBykxjH6YS9zZj','admin','ak_fb12f4cb08bad6c4','2023-12-18 10:20: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=40069;

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


