-- Host: db-master-8.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$0tv8IKOrMawEUR.lIdlUqziaBsDekiJltCh8wACITSAFoldH8Qr6I','user','ak_4332338d9a3dd1ce','2023-05-01 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$Dnw8qdHjEhvo4jNejR5RN8gh1SPt/5aii7jm22X1K0wJ0EtsJ6hqv','user','ak_d59c6a9bbef3767c','2023-10-25 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$8zXk0mGAIO08JMAt.XNf6GHTOhnVuzSzvx1iKKVivfR3xV8yCbwt7','user','ak_ab3182a1562c278b','2023-11-04 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$VHH7HEr46uBaEIMhtscybQcv7iwKztfUrfN9.znzx.MJY.KW1370.','admin','ak_b9987b86355b4113','2023-09-22 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$8a9fOwTgSZtbY3y2AiXxci3Yh.jvrybrZLkOfpzhAZx/q2p8hU3qH','user','ak_d1cbea30f6684029','2023-02-11 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@example.org','$2b$12$Eo3E1Ei0B7c/iPwCwuilp9MU2HoxYclzPPe6qjwqiSF7X49fRu1r1','user','ak_5d31cc4e914ed306','2023-05-02 10:12:00',NULL);

