-- Host: db-master-1.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=49853;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$hOJnBSgrv7Ag2sVFtr2mTBzsdOyKMa0Dutp5z1OldnO21dZAiYcQJ','user','ak_81dbb949d8cf9d84','2023-04-14 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$7xY4r2AI8Ov1irD23Na0cz.E38EVcDFxW6imcsG7ZMptXcbyt0jBI','admin','ak_3f0d7708d7c66c79','2023-07-07 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$AtQ0yxc1mnvOSJk1P9.3TW5pTrdTZQt/BmmzmcVtSNsiL27Kw6Zu9','admin','ak_691e5837cb9303f0','2023-08-11 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$ofBY7WY78K7TWCXliGo.TASd9CSRlLzyARv4/G1MsMHz7ttUy.Zlt','admin','ak_194f44f1f993e229','2023-01-18 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$Vs1GIVFUcfoxXCbkUuXdKB/oKmG2BDi82LRWY7U0SAvZOXeBJbEhk','user','ak_7afecd28cebd4f1c','2023-12-09 10:18: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=36736;

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


