-- Host: db-master-6.internal    Database: analytics


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$CcfLe78DbrRoazWqhnEokigzvs2NPIXcLJm0kAUY5LmYQuCCysCtO','admin','ak_bbfb86589f17854e','2023-05-27 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$vH3/9El4G25Fqz835en6IQsq9ZVji/KFv04b4d4c9j0suRgdksemy','admin','ak_aaa305db50a8b8a9','2023-02-23 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$MjVtb1TGJ9ZQ1lQWB8b.oHAnBNzYVAX.QiabkxLu0r9vx3WDg94Ir','user','ak_e317d73c4bf41668','2023-08-11 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$RbAaQiGxlHcP9CK8D0WMYYprz.9L6DK.RAHuUw0ew9xSDbVUD/Vkn','user','ak_211eeb21fcc0bd2f','2023-05-22 10:18:00',NULL);

