-- Host: db-master-2.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=18214;

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$ySLe5RJScTTJLlmHBUYggYLvBvWV/2gSnXtlcpXlRF9Py.sG1Tnf3','admin','ak_00984b7c9015f382','2023-05-27 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$Lu7pBhGopmoMo/34ImsFkeJvOwje/LAHgpQn8whxUEwMdmmkd5.RR','admin','ak_ac97b95df7128d99','2023-02-20 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$97j6u0c/Ji3JWtpXFbJyRkzgQlw9WFU0coBuXdw368Fe8V/M0jn22','user','ak_0a90f556c13b7fe6','2023-10-04 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$QxW0zySYtbOAE17tQFLLxmdeY2A.D4DEgwuRwVmEmz6g/zRXHqgKi','admin','ak_80196b91e0c630f4','2023-01-12 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$DuVl/6WNrRIjHn/UQ7ytdjc3XddOc6dipiEBybVyDDqFp2jk1pIUd','admin','ak_c8749a36b0edc1df','2023-05-09 10:17:00',NULL);

