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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$NcNkMzsskjXqmGB7qwvX7rQpIdKsGLpUeVIad3lGBbZ4Vda.5LY4n','user','ak_6773d204230656e8','2023-11-07 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$1o0vKARets.m12V4GSXqEkNEL.JGeSurGHKZPMRAk47x90DJgflZ2','user','ak_502f4cf2a51acd3e','2023-02-01 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$ks5EDs3o7qVG/t0KU4r5iSMgvPymdXE6LLABrUPpd1ExBOROKG3iz','user','ak_f1912a823a23433a','2023-05-23 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$rHME4lCAsJuG1mopxjzBmvcngxHOYeNBjekW72aWdo8WFGMgaNfzp','user','ak_aa1a72c74862c9d7','2023-12-05 10:01:00',NULL);

