-- Host: db-master-3.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=35698;

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$E5kj09Y5WRNPFx.dV.xBucAs9P76fXIfR6TLStDTXLM4jNcC1Ov8x','user','ak_da4968f82ed7d775','2023-07-28 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$KP6eTrKMCbE/4PSUlmZeNSlEgepgplC5C7Q5AAVs86Bztrc54LXX8','admin','ak_d36ba494906706d0','2023-06-16 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$Lz5WgTm1cVx9yltCx/WTck8FUJo.QPJ0UAKU8U0p3WXtIiBbfUHuu','admin','ak_99ec295bbaa6d0df','2023-09-08 10:15:00',NULL);

