-- Host: db-master-0.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=38879;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$tyrD9eK9uGJKB5Djm.4Vev76lNm9v1YCS1/2HB5gdWpgofDacgxXA','admin','ak_421ca81e1a8b9e0d','2023-02-18 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$sQX.IEDvPw1/drXHv2d.NlbeZxu63EKC.sMk6jrw7QNWv2NUIob.E','user','ak_ebca050024749ba5','2023-06-11 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$FC/p1s6t/tPREAvSl9UrNcUvPzRnj2Q4mtlfH5cAlsL2E3e9K.8s1','admin','ak_e9fe01d0f05db1d2','2023-04-20 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$xRBkpGSART.9t1LwLuLG/FFqWfD/r2Xl8YDcLJcQ.vqYa6GqF9Aac','user','ak_2f4e70d69637346f','2023-04-11 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$1rl/CbDqniq3bZF89ZijcnDX7jBxM9DNPm5ayQw.9Zi0g2bU2iNVS','user','ak_e502ccdb0ea99bcd','2023-07-27 10:19:00',NULL);

