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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$Wuq4hykYqB/zKpd2oS/bxqAPVGcFmPWuSyAKF3jtG4LpP9WFTVrmi','admin','ak_45b2e62d1133f82e','2023-11-11 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$iWtS9YJjgeWGp9xpFPvvN03amzP6CE7ETdGJmzYUK1465EAqH3gz/','admin','ak_537732f4b012e704','2023-12-24 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$JugN.6COvWLXfM6JAmHa8UZR/Bcovxb6aitpc1nm3R9zsDbx/v6EM','admin','ak_d3fa64a37812740d','2023-01-26 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$.rj.hf2Tqn3u2GYS8a1BLL4eQ7V/iM0mx2FGHfnYTJgZiRzna4T76','user','ak_d485b565311db153','2023-01-16 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$c5S8MABSCZmZVFBtpQ3LnpoORP6fqNxx391CGYX1.uehv8wS2X1mS','user','ak_bfb97f9afa6ad844','2023-01-25 10:17:00',NULL);

