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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$sJsWdt9wD9fRljGSGNTd9CV7DglXhTL.OdDX745Ia.TSEiQ/VB1ew','user','ak_77bdc8cc1ebf2067','2023-03-18 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$NiSm590IPVVSsyyHYjOOBPAIbh0Gzb2MkmG9I8OUm4vDQWXMXZkbE','user','ak_9de4a0f7ef7826fb','2023-03-13 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$51uJ4VIR5rbQevTrtZRkLpHs1ZfMn2D05F2mLcmBAU7KFPKn6715U','user','ak_fbc5a10bcbcd3200','2023-05-09 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$9naS71ymKapW2vGHPyHF6jen2Rf2onQf2mmC/nm/Nz987m7rAELO7','admin','ak_5249b25cdab6eb2a','2023-01-25 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$yF69PLvRv47HMs89CVhRYIK00TkqthSDWH21rWHDoq6t8LXCD/WWk','user','ak_a9712ac9123c79df','2023-02-17 10:14:00',NULL);

