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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$LRi.i0838dmFlhvmRN9PPvxpqhb1PTjFTExVRTyNklmFV5mDvuFoT','admin','ak_21427aba459e33f9','2023-05-27 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$7fCKRp2bY9H6JAoNRW0JOSDl2rSGauGm47kIkeV5yhCco7x0NU8lC','admin','ak_49e3921fca3a8628','2023-05-09 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$1s/u/byoOCzk2OObw0fDyk7ugC7EC4A5UyKPYfOKSCwdZ4epjLBvJ','admin','ak_3896fd0fb1d9e07f','2023-09-18 10:11:00',NULL);

