-- Host: db-master-2.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=32081;

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$Pjplti5gGYyvsdN6SSX3ubYQOw7TnQLgu8JwpmHyMqnckQYwXx2Jo','user','ak_9203acc6bf6600c1','2023-08-07 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$xC0H77NyIUGVkysfyitJtUUZ/7/Bhvnbw7V7q.ZghM0.dkxQoiHii','admin','ak_44855f9f2fe7fe1f','2023-01-01 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$yOFF3cFRGbdQRSqt8MBSr44kHeC68HHjTZqUyUwghYxUb98bSfUB4','user','ak_f5c0b0f4a6b6d5b5','2023-04-04 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$6FXiTAkZsSV2sz3m802aaBUTL2jImu6A2vbnzR/AQuV9U1p05BdUk','admin','ak_bd417947e6f80f08','2023-11-12 10:01:00',NULL);

