-- Host: db-master-1.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=18981;

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$cZY5GKgzRbcJwxxVY46Zq60.kn9I6gfW.AzlHPYKY2m6seqMPIzJZ','user','ak_917c7a25c078ea5c','2023-01-22 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$xZfFaJn48r.OKP/AAhS8R3ih5r8c9ZasFJ/khsIWFp1IhVUc2P/o5','user','ak_8a0bbef77c5d8db2','2023-07-13 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$16V1XnqJWEmqYjR0KPR.DCxpg4LZnMUACZMfZnPsXmZ2f2U17SE7/','user','ak_4bde9a1e0d8a6f47','2023-09-26 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$jLLkh.cTu7j6VUbIIwSkJWYxe0fCrh5Yw/d/yVQsECfPBlrHq1/G2','user','ak_f7fc3a8cdadad59d','2023-10-15 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$zsfOgKCvr2GHJ.n2s2GFPDdF0tqBZkTFFd0NCwWgpa0j.GefvZ0yD','user','ak_8e2693e345890fc5','2023-02-11 10:17:00',NULL);

