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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$MAHYEBeaTSwa4ZxJ6Ox7xINjSpLrZuPivu4IBHWART48d9uicBFm6','user','ak_55ab9af379803e69','2023-03-09 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$/w6KLehgaK8l2nvlADZWKeiX9NK/jcKLMv/494EgVgt3TEHdaO4vn','user','ak_35b6a07b9f1d1afa','2023-04-06 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$bpsu1KoqNKf2V9Vzq/E.X7rUudc89hERBJL4/a6SGHQJ7UelZL7D5','admin','ak_aab0451df14ac386','2023-07-18 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$K1ZoZPFOT/P3.dW0NJxaYNAE/nmdU6QRegKuE2/vDODsWtQfHARy6','user','ak_4115166c2894d423','2023-01-08 10:08:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=36251;

--
-- Dumping data for table `sessions`
--


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

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


