-- Host: db-master-6.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=28386;

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$uxPAf58ikQS4OwGy8Uq3ttBkmclQO9wxsVed5CBdPzSNWB.Iq82RY','user','ak_c19e8ad6f5e4fe70','2023-07-05 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$MymPnsqCxBQwZ7zKB0EY4EeEYYTvHj6mFrDD6KQlAOdGcETZNREZJ','admin','ak_5305c19e4d97cc77','2023-09-11 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$c1Qrxo0yKi3pTi.9VEUiWpQxfrDLQsZYg1i4Ol4nLpNUcDy6cVhk5','user','ak_477b8f57b8a2c7e1','2023-07-14 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$aR6NG97/cpOmgFg7QWaeXsf5XnhOewhw7rbZrJQkSzh3xHaqrGjLw','user','ak_a9ac034ec67feb86','2023-06-22 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$7j6sk5zkD8Ny3ZZHHbQ.vyHgytqgLOdqiR4BbuhEVRZHEBX59SQDq','user','ak_c80d6e147b2c171b','2023-02-21 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@internal.io','$2b$12$ax3t6c/J.NIeoqlsqAnJtSQWbzloQ/oAUaUAW00X3itWu2e5TtVpk','user','ak_0aea3e83bbd073ac','2023-02-09 10:05:00',NULL);

