-- Host: db-master-3.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=6098;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$BtXEtHoye.EkTsZAQggZHBUIPF6Qv0tiiO4BFOvj7ObiN2mnVuw7n','admin','ak_18932b38ca0801cb','2023-12-09 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$oYvsyYobOkyRTWkxtnFjcgW7vYZlGXjlLs0lQN5Fm8xY3A.aQepNB','user','ak_89c419e672544819','2023-08-27 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$qMiBULHf7yfpFRyKHqjnY1rUSvA9KdG8l3V9/K0OMzY7COtB8Vo4i','user','ak_473f89c5a5d26655','2023-10-19 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$0jVBD1fbE2zkro99xKpHXz8GjCAy6JPT8EfNToZFcoSQuroonM16o','user','ak_de2911ca852e91f3','2023-01-26 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$H9UaVDQ0UohPrcEq1OQBPlMqgz4lemQU5nOKvn0xVqd.uEhgAbJJx','admin','ak_0ae59746c5b72d00','2023-07-11 10:00:00',NULL);

