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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$VjsQzjM093QOxrK4ZygXReoKb0oLM/A7SlqYhbPysvIytzZwQL76G','user','ak_7a683970422eb47e','2023-02-14 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$KSNsS9JJrhftff6ayCcmZZDd1x5OVwGOkkZXrqhrqVveKDdfnbial','admin','ak_5f058f477d8e9cec','2023-10-10 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$XQ6F1UvjkMZ0DbxXlI03l683uv3gjnfQy1jM/0Tuxrltu/9WvIlKF','user','ak_33aa9a362732abca','2023-03-15 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$zmrmg.QPykqaGlQYuvNQEzv8kpEVyPQf2PwnjQ1UhPFS.zhACPoNf','user','ak_11298af2765757e8','2023-05-21 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$IrpQiqQvnhOf0/PXCXk1ZjNhAoPVfCHHIZ60EYuvdsw7EoXfkkp0G','admin','ak_f0426bfd0c972437','2023-08-13 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$CEfDTIsvTPDC1v38NmdAFkM7sEf/CnF5RclESpSLiesVJSO0/CHl1','user','ak_d0b62c2a29d68b20','2023-03-09 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=26592;

--
-- Dumping data for table `payments`
--


