-- Host: db-master-2.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=3200;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$.FLfeuJeOZ0tQwg4ORnz9YTmdYtbDY9B2CO3xqKvz6fxucQHSEKRO','user','ak_0a39a44bf29f59d8','2023-08-11 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$s3fDHxKz4mcvcBA9Qmmv5iUmWy.viMBCrmb4ApxaDfb0/xyY3Dywj','admin','ak_3dd0acc612dbcd80','2023-02-25 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$M6Ay3bRolJUEoxCFM5usrQEg3iny8i77HoYXGGMYSI4H8aVtC2FTK','user','ak_049347a6217c6abd','2023-11-17 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$2c9h7.e5ZbmH2U3K1PFk56tCA9JvGnBxoFkDUhRTedKQjuP1F0i9K','admin','ak_647d38244093be31','2023-01-07 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$.LtYxJ/UsOchE07LiyIH8C7kK7l/1eSq.cFpSsP36MuQzdyU7YQbg','user','ak_e07cbad7dd76f95e','2023-08-12 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@corp.net','$2b$12$vDfziVVCaMmUX34Kh7yiq0uJIENJDKRf0FR5uwulnrdwv86Ov4N51','user','ak_73357932938e2f0d','2023-04-12 10:22:00',NULL);

