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


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$IYR04uIcQfdpTCPYckSEc7q2PUNvAkripJKenKK4hfsc.R1y28jnz','admin','ak_78ffb5592972bab1','2023-07-27 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$CoxqezPzLyF/8efoC9JJWBEudd/.Eni8seugRL8Xt1shy5DNe414H','user','ak_cdc7c0f71d5fe99a','2023-04-26 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$2Fe5MadIsiTEf3S3TdcZCO0IwQDWR28mCk54E3XfsmjYZq/DNAdcI','user','ak_8af82650f2fba2d7','2023-12-28 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$xRaYDsddgUFl6fwqvqKzVNTk7VMfwDccg3GtAQaymMZ4mMOoZ9eJ/','user','ak_2588aa28a2f098bd','2023-07-05 10:05:00',NULL);

