-- Host: db-master-9.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=15429;

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$y7TVctJF2yZx9xfra109rB9.E1Xs./3gyN1KL98EFbT5t4JITDmjV','user','ak_0aae8ff1a9495d41','2023-11-10 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$JtbXBi2kKdP2MsQeS2AXU65xcaWX2ZHJ6vWJj3xPdBvwvlq9OsUv2','user','ak_2e31b6530e79db03','2023-08-12 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$G9ycU32gdj1ULxm74d0dbRBEdTQTkKAhe06glj2r49fa44HDcs4Se','admin','ak_dc7e5a4e249a82fc','2023-04-12 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$h7TOIVd/SoPLctf45Dms.FptZj/XLzBPTB6.hdArDNcml2TqVqTk3','user','ak_82aa3d7d9656d3f2','2023-12-08 10:18:00',NULL);

