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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=48009;

--
-- Dumping data for table `audit_log`
--


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$oPvoTZQXmwZAui5PtIGm4WTTvuU2PmlLqbQeCxfUxmEVFbsEVzMJ1','user','ak_2d38c053b0d649f2','2023-08-22 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$mWZKbrWld1my7/c0.gjFfR3lm320wFNlka35pW1Znd8Q5maiwVk89','user','ak_3b4d07cfb1ad1f1c','2023-09-11 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$mH89fjU4o22dB4KPhV2TTQqj2prbbrUtw5bpKWCKV339Ez2jnDkG8','admin','ak_09898f209e02e6ce','2023-05-10 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$sZy0L9/b.E813n4OLcmp3pdQVeMXxcWbwRYGJkNqQwU2TWEjkGPW3','admin','ak_0f98f1204fd02bf2','2023-05-19 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$lci/aHL31VUjLw6zt2mb8/cdNghFAINuhp5cYIJADp3FBH5cXJbRK','user','ak_d0f65637d5a4fbd4','2023-10-05 10:10:00',NULL);

