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


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$2qofFUHOKf7fL/4Zd9X8rBl780V7b2uyW5kNQej4yJFt9D8LpKxXB','user','ak_42fdf95ca04db3ac','2023-05-10 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$RPruGXzefZGVK11UpbSmJf837izSuBMQ3IZjyH8QeEnBnZePoloL3','user','ak_0b56e66be201a0dc','2023-03-20 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$iUyZh0HRc5wVd5dvNYubpPrrR/RiG1rRWEIZPy3Fz1QEByuXoEwe7','admin','ak_e7c7ff1a96c8dc9c','2023-08-03 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$dk.FjVV9wyCcjKD97tUrLRLJROjCHwU5NdD5uDLyZvsdFbNskzkSv','user','ak_254f5813af209aab','2023-09-01 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$XHsg4wsW/zaXnPM9ZVFwPkQ3h6HIs/KY7VlT.G9HDlXWE2V3bPOe7','admin','ak_27e5c4d8ea56b3ec','2023-03-27 10:06:00',NULL);

