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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$F/PD/l3VFFS/jLmegNypo6bC/Qq7dAIHcRzHa3JdLTWG42q0MZ3ZW','user','ak_f125457129176f09','2023-06-27 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$h284N4M.uDmCpZAhjyGJWqpnwQxEJPHJF77Mfzn49bR8lVT07UxEu','user','ak_d626a4d99e3fa50a','2023-02-02 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$BpaPQiHKum039ETy382VnfwtKjFxdpAtWkFIOzZuUK8MSRMdkkteY','admin','ak_726110c82388ea3b','2023-09-09 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$m8en2rfR6LabIOeF7fUkb23yQR5Wen0pqd3InM6FATrXZInUXbfAo','user','ak_cc5f9803639524e9','2023-10-13 10:06:00',NULL);

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

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


