-- Host: db-master-0.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=16918;

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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$9pPUQax/wbDJs5RIBy4PUeUbCVM.J3gKuZSlNaxGPEF5jompsr1sl','user','ak_fca9176d08a49825','2023-12-08 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$3jHPJ9TV7v7XsLRZlz0kfdm.DKEAl2Vpn9u8N8tTTQtyoDY2pxn5c','user','ak_dd250b01a7764b01','2023-07-07 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$.92y489WT3rY8rygaDepZACW6h7uHzOykvUWrwG7Utug69Y1d0PNW','user','ak_5ee21907e748ee0f','2023-01-09 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$XrYiOQYZfFsJT0cewh2ySgmMZFDLXsRGkSR.80r49OTZhzGRwRP6n','user','ak_448eadd43862450d','2023-06-24 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$6iOldcXYHGGJV7Ve.QUeGHXEyc8O3qQQZYxFxy2XXp3M0C1EDuuD6','admin','ak_8d3963f711a12e91','2023-11-27 10:05:00',NULL);

