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


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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$Xtw7cfA6WkU/7xj74SKTRdwEWfP6KLtInTaJeeJwrUZk8kqUXtbdz','user','ak_d9cde16ae05240cf','2023-01-20 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$TfIc0FNzLPW2KOdd6R2BT3yBTzOIUss73C9qPKE2CUnwRjPgmurhi','user','ak_9836b9ede65c56fc','2023-02-13 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$Y4TEa9y8nAl8qFqY.IsT0Es5QbJ4StwrHN.XAHfzIHJMQQf2t/KDG','user','ak_17318c07f788caf9','2023-06-14 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$kPR/T8KMvE4agHNMLh5.Qr8qYLwnO/IP/S6UbbO1/GWOWIoHb2yb3','user','ak_ad63873bffd02fd4','2023-11-22 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$RxtykAOoUCLE01uK9xgngR99BtzeY7A.xgp/BajyH2ZO/j5ihH3mP','user','ak_95d826f5390e0f96','2023-12-16 10:08:00',NULL);

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

--
-- Dumping data for table `payments`
--


