-- Host: db-master-8.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$ZxFQN309Tc6zcpkEIkSJGLOD7t0EwlIz/OmxIQxXG5BQA6rZd5fEK','user','ak_30b171fecb76f0db','2023-06-22 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$bw/8pfeyHclRgyq4yGNGcykEFbzFucImZHyEQF1UiIbRlwBXzvrZr','user','ak_dffc7c80b0666c9c','2023-12-03 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$ZWK90YQV8jDWioeVf.Pf9fTZK4OIqJxNhJVhe.75sJETpXxvoDrdY','admin','ak_3012eb9cedae988e','2023-06-01 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$iTQ7kfiZebxOajSpXUHJlWGdUbScpWGmBYf1zVVbVmsOtoiQQLkGh','user','ak_4f8aed48f3e9a371','2023-06-16 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$DjBqgfJzZyScCppKhHz2l6HrTB.BYTOcRYY0I/2p/7hU8Du3qB7uC','user','ak_408c75662162580c','2023-09-27 10:22: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=23740;

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


