-- Host: db-master-9.internal    Database: production_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=14402;

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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$qM.TJxGzrELketSGczntk8ozXN86mHzG/YYE3/zwrdG5gUv38rrFH','admin','ak_042b06b2e715cb8b','2023-02-16 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$bqAyri2VkwFHhoQu2y.WliA9fVKDOh2rsL.CdTRkeNU38Ooqr0w63','user','ak_5bcc8931d50704e8','2023-05-08 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$I/QjH32Q7pffeE9KbZ/BiuDBzlc685j30SAJUF.HMQ5kyfKpd342D','user','ak_7c4dc20afd2f12eb','2023-05-01 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$fytKwgZjaR5Z2Q2qKRXR9Nak1lO1kIDqa83VHQweQDMI10uZo/0f6','user','ak_a8c57d07e8883d42','2023-10-24 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$UPwSK2VPp47iF.bNlQE0OXHkjLSUQTytYfNxpzR/bOhQuf6tlFBzC','user','ak_c3d54223f41204d9','2023-06-03 10:14:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@corp.net','$2b$12$wfOOOX3clBl1mOy4EhKD17E/sBGCzoj009R1IhI5d5mL1WCzsbdud','user','ak_dd7434dac7613de9','2023-06-16 10:10:00',NULL);

