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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$MVVrDq3gqDAaYkZlKiZkTS9VFuhy3MB.IB7DS06CkVDMCK88hFlvX','user','ak_8015a04f4770afa1','2023-08-28 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$zo0wKaCI8wTe4HzodByCzW2.2l52021GOV8fWQYOWWGWOPT0FNP3D','user','ak_2fb0facca2f67ffc','2023-04-12 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$bQEEuNBRd8aadM15oRXU4V.0.hnAbUWVyquGJWARuSoRh7Zpedopc','admin','ak_9d5d8408ed1a8c9b','2023-09-14 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$NkmnR0DQ4K5/tgsstsl9nVVgDb2bXFa3pnt/S2DNy2LUhIJytggo6','user','ak_6d2438c054631830','2023-01-14 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$Z8W2d3BulvfmGUnBAMOUCGCeYtSKe7qu33t0LKUIWCm9XBV09DCCX','user','ak_1c80676d689a039a','2023-10-09 10:07:00',NULL);

