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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$hOli4qaF1lE3oHuXWuGuUXiYtWR/pp/ip8lDkT6ET6hH4Xj31WpgR','user','ak_28b02a3dcd4561f0','2023-10-01 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$ebKxPm6RcrfHQhsLHG.QwdeDchXy5/lDi5uAmsfKmYgM5PUJ1P/BO','admin','ak_1227f14271934863','2023-04-20 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$rSuirOFTCpiGFSZe/KUZFnCMHB/G8PRoq4w98g.gefc8omytkVaVQ','user','ak_f1601735a5d306bd','2023-03-26 10:16:00',NULL);

