-- Host: db-master-6.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$vLqabt.c52J48D9wcODK6W0XS0LY/jbaDxV91IP0UXsxzIoSuXK7c','admin','ak_f7c43be7321779d0','2023-04-25 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$1eqJ7Ici.R6lRAm82wvNU7RM3Ffz4r56jN9qen7tGEzEkX1tiiJ6p','user','ak_52a098252cc4b013','2023-07-06 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$WOy/xrx9/y3RfFqzcE93HnBwfPz4rWZLCTq7r4ZP1QMKahJSr8pCE','user','ak_330a587d100d4e78','2023-01-12 10:00:00',NULL);

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

--
-- Dumping data for table `payments`
--


