-- Host: db-master-9.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=30198;

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


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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$XtCSwIDdu.mhcOSsZkB3CAXr0SBcDCFUeS1jsimHMspmBO1NjbZIt','user','ak_4b7a24153711c895','2023-05-20 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$dj0bbOJSK21SIf2r5r26pEkF9QXu4bjb.XjUSYvsm4yls05p3h7Kn','user','ak_d2d1a322c5d4837c','2023-03-20 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$KfuSILCx4GP6lnJG.b1w4TJy6jQP.2BvyKxLjUL/f65rM0.k.mduP','admin','ak_e818db9803eaa242','2023-06-04 10:11:00',NULL);

