-- Host: db-master-4.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=44674;

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$dIF1q4zBoV9UBonFOwwZtaKTqoZ5LYofKn1r6MBzyp5rKx9EMUUJi','user','ak_dd5377f09ba6bf49','2023-04-27 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$hlctWiwhBWlw002K/3LE1N5vthWe8I.rVtCu6QEC5flEx10CtHeR3','admin','ak_2e303db16ebc279f','2023-06-09 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$BxO4/bZB2Gs7pm94KcScY80Tohp4frhU3/LGvwbDJt0zXyY7SJEMt','user','ak_9aa8871f662711b7','2023-01-16 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$00jWdX3flZRZt9wEm5sQWlVeQDPe1/e6kyMNJCYLxNr2X4UHpp.YE','user','ak_4637ba95ad93ac15','2023-05-14 10:17: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=6554;

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


