-- Host: db-master-0.internal    Database: main_app


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$kcZ8/gYOSjGY0djPlhHiSyBYvNOurjqdViPwBbvo81xHBvOUVH4CD','user','ak_a95984cacdfaa8ed','2023-05-01 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$7tniLqPUP2gTO6vK/PFRE4LDz3LESLn9ek2KzNfzyzLo2vB5g8ix3','user','ak_980f849b39bb2d19','2023-08-22 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$oKzXs9e0G8v0zbJBN2CxnUL7jPWsdLgDWQpSmYKUiNJB1hm9fVj2n','user','ak_7676aab969b0493e','2023-02-22 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$HZXZkq846GRJDsv40YjhSgNfQuB3qohAQ4wD0yIIl.FGHG0s39vXr','user','ak_8b86401a9a7c11fd','2023-06-24 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$kOQP.RSEBWGAdEsEArTMOlcQeH333kT12hb.V7bgW6EP.E6RPU6vn','user','ak_9643b7abee54f0f6','2023-02-01 10:03: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=45952;

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

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


