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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$XNFRIUIdOT3wWrDbXTsn8YlDQtbkqfhbkWu8QpY8xt4VTyP3tQ/GY','user','ak_6acb12672c53203b','2023-03-20 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$b4Z1QXv7K/3d5gePQLeTuincyRGLQ/GUNqflqauL6vhBlBj1obwBi','user','ak_adf66e000dc587e1','2023-07-28 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$q3MJKSZFvy/e0hZoDEIcKVPB6yT9VFbpqMvyQLnrwjUHpoRoWsbRK','user','ak_bf957ae08dae41a9','2023-04-17 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$zHgyt5RTXzZ5uCWL/0Yd2v.D3l1K4UO9Cml0fHJvyXOvlczMEeXde','admin','ak_2545a9b891b0b399','2023-10-05 10:17:00',NULL);

