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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$zPMDGCOb77bmxMpi/Qmq/FgUZVhcUUJyk2Edj2XYtlOBdxvHZ44G4','admin','ak_6e0940c10874aa36','2023-01-20 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$TLe35XdyOkAou4JV5RvNlN1059XaeqMWKEStxFVTky8kb.mJ00rlB','user','ak_2bac4e132d07817d','2023-04-09 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$N3G1yV38WW/ohghAPDrcKn9ti4VB81VgGzfl7DuCNRYiYZEi.pSnF','user','ak_5fa133c2b188070d','2023-06-17 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$Z6a9x9bhboDFXr3pIZISuMLPZI5865wHy6FsKzuhBMCvNATqw7AkH','user','ak_5ee66a15ede9f2bd','2023-12-25 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$dp2vv9JdmAkirkeMcpTx0HbBZlDc3hmfQd1/VAGKigETv1QfBLfxT','user','ak_a146641408fa39de','2023-06-26 10:12:00',NULL);

