-- Host: db-master-9.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=23634;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$6pyia0ViO1MIjyXwzhfwcmo5CqIlhIMaUDFxHR0DaR3YsGbSNFfvk','user','ak_52ff1f5b6d0bf98a','2023-02-11 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$0gyInHvL3dr.W5ZzZFNhFDxcx0MslNSorVSutbzux5/EMYg0s4ESd','admin','ak_49fc53fb221f47da','2023-08-17 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$0l7HEvcDV3cVY2kEH00wDB4aw4KWB4BQdJLr2sBD2wHsMt8Vq7AKW','user','ak_a3eced31b100ac1d','2023-12-09 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$/2hFA0tRarOcVowmPmIcU3Y64vu9/SrqxrGmGly9I44G8wMYTtsUz','user','ak_7282bd55f99ab4d7','2023-07-19 10:09:00',NULL);

