-- Host: db-master-4.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=13684;

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$iUm0Cvpp/VGM9Wyrg6/cmdPXyerMhvgGyN9rqm7YamzydwkZdsCGq','user','ak_1be59cfe54826a8a','2023-04-04 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$83Q8Nb0in3ZiYk4gtPtqE9wiCoifCGUs94fl63rli6.sFcq1tgOY2','admin','ak_80664c3a0271e64e','2023-12-22 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$VLmfUjTAr5N0noeGG/WFZLr7qpyrK0WPys7xHaJfps9hMpSVHpakx','user','ak_66d2fc07b9fd3775','2023-11-12 10:18: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=35177;

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


