-- Host: db-master-6.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=38885;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$OpmAdmYcguD51lrjFkt9P9tM3.RXuwHCYFNDVmVmsdgZYpFnJasPJ','admin','ak_a3c6543266c38285','2023-12-18 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$3NToQOkukxIFcVv4QLc6neWMIMY4q9b2DP195/ZxG6diDT5Bo6Gsh','user','ak_1574ce4972e137ae','2023-04-04 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$Bq0PXGVMQE6MYq1Kg48qjiFExXBTp.yMLMtMosfk2TeYkBnK.ip4h','user','ak_5762a6630372b060','2023-10-27 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$gh/JMwLQjHjD3l2WJfxnd.ECObZhKeH8Hh1al8B.zrWHI9R9rntne','admin','ak_759c109d8d456e1a','2023-01-25 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$y2iX8JbmySDb5zwHTW6P.Ag0LmnbpetYuZm9ffvEcl5xj82TiMBhZ','user','ak_d6ac249c5851fb55','2023-11-12 10:02:00',NULL);

