-- Host: db-master-0.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=17837;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$AjknRRSFDLaTzoGCi3d9cpbzGfzmzGwOotpYnGvpO1/KkHmQTWl6d','user','ak_0bae3f17638103fb','2023-03-28 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$XFFGjDpE5Kn0E60X7gcDPTMR8N5qG99Qr/6XJsRyC7FeXlp3JTPxQ','user','ak_b179a4f57e3bda06','2023-07-03 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$JEl.ubww35iC1a8qVwOUcJi62YUzXrRs6hGl9rboPEmEBTTR75RI4','user','ak_faec8253ac81f5d4','2023-10-11 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$adXfpl1qFKoUTCxi8PFzVRIpj1VehNZCJZH6LD9R/5/v1Yg/zvh1R','admin','ak_31ed46f8610c9154','2023-10-02 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$0gX2baH4MjD74SsV/E6uAuurXaTGEoKvp6qqkWEOd/JQQeJ3n9Jk3','admin','ak_63ccc2277c758f1b','2023-02-12 10:16:00',NULL);

