-- Host: db-master-1.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=36904;

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$/BhOkKmDHdQZseoYyduehfXI1ci./J1RpDJIPiWAJEe07LzvMJC2N','user','ak_e62105f525096c37','2023-12-14 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$/AW7NwL8xWR3NEYle7eGtWhkKvWGMRm6u/npvowjYoAjnYPLbjnHt','user','ak_146a12cb212cb98b','2023-11-17 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$GsU2g7SYpAUE4tPm5VIOisz1L00TwPTNrzCcUa1miCxCgdn7WNdOO','user','ak_6ebe4decbf87205f','2023-01-18 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$dsU2wQwwv74/m.genECFdaklLKmJRXg.eICfEdxwdSOejypM8Qoan','user','ak_e1bd166e7ca1fb22','2023-09-28 10:10:00',NULL);

