-- Host: db-master-1.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=14803;

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$JHToO8oZAL243hz8DFi3thlGkRwLm/Nou56t4vLCdusgSQ5JwHLvy','user','ak_60c44736a6bc223c','2023-10-14 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$I95Jjiv1NWVRMFdAltQurlQMhQYtNLv62lK7F5qFCNIGNQgqbHqFc','admin','ak_d0acfac6032cb560','2023-04-28 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$M/Hwaqh5fMnmjUiLl5OWzeMbkbba5.eF7LyZ6LCGP6ZQ7XQGQ/SnT','user','ak_d33cfefd318f111e','2023-10-02 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$2QogYH9llSvL8EeM/PQYeANmCzPRCU/2EF2MSLMXGqY2OUP3Qm/Xc','user','ak_5783e578b989c2e6','2023-04-28 10:20: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=18989;

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


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

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


