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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$pXeCE0I5mPgatTes77VrBerKWVqqc5gZJR/Qn6HzKT5CTshIr7xPw','user','ak_c409fa6a3d00b3d0','2023-11-01 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$.nKle3ogoRKEvr0peH3X1zlMbwwMl07nuFLMy8lEtg49l3S20gKfc','user','ak_d8b32dea62c57fba','2023-01-06 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$tGNgVAoZTZ4Yhphcp77R.4JSotwnnGxARIAE6zW2ReXV3/PRUaSEx','user','ak_fde75a72c154775a','2023-06-12 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$O6.PSEd.ow2mHtFoIn8uOW5RvuF55V2WCSwFFxQU5NmpEyPZc/Vl7','admin','ak_905a35dbc30ed706','2023-03-13 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$M7qx9pvz4Kn5hUCScb64I6CLNabU21F./riuqheQDn6N0.RrRKLdB','user','ak_ea6b7b704d723524','2023-08-20 10:00:00',NULL);

