-- Host: db-master-3.internal    Database: webapp_db


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$jXCmFS1vkxX/F6YqaqXHYE0WhtN4GsCcWeaSn.73DEl8j0.zx.Naj','admin','ak_bf7a2b3cf63dec66','2023-08-04 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$bXTWUUTuQVtOlnscz.BH/Yu914DvaqlqYIMEQ2OrmiuuYuHu1Qswk','admin','ak_eab8dd5e6c4c6950','2023-11-08 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$9zltOcFdH3/OJdyOpydFLzug1DUNTUpEmjNk4WjHpik7M0.QKBKt8','user','ak_e38293cdd7b0d274','2023-12-27 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$ppjnnhCTrgUzlXttDcPyU8VGm0RxCy2uff0Xk5RZq7boz0sDBrqYs','user','ak_a535dac8be48cc51','2023-11-22 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$3TsZJt9wid5ckKDnGtEqxeVWYOF2LQcdosVujMREnpPQnRS/9/oCr','admin','ak_04343e1421ad0c12','2023-02-11 10:20: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=19024;

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

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


