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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$/BkNDtM2nu.hzFMvJQSac0/kH3ZRWiTj3UmxmMgIRGIBIZeqiTNtj','user','ak_043c9f1517a2f898','2023-09-10 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$f4qLoePUbpJjT96ZKyicj5uf3mT/33OCSsBhvsPHKKwjs3ZsPE0ED','user','ak_494964edb3d911fe','2023-12-03 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$t9Ypguk8eFI5TrVzAJKCsmMWMsUReSXLZ0YiRV6vvDg5bUXilG42R','user','ak_9459ca101e1465f8','2023-04-23 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$.wLd/fBHulxZFIjoMklEU1Rp9m18veE2mNv7G5NYXlEq4hUX4Q/jp','user','ak_4cb33832f58d0809','2023-12-22 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$PrrQMrV43r/jlfdzxKmeV2ttmCq3vF2vIIOL1e7AFNK50DfpDbzaA','user','ak_2c92f1ac42ea9742','2023-09-05 10:08: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=8443;

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


