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

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$HnBHogLsO4Tv7h11jWxdtwanqKWt9fKEAzbV/bfwbIXuZxrpJpgF7','user','ak_ac1e46c3442b8a69','2023-07-17 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$VZ5RxX4jP1aL5v7spMIzdRByn50pu.86FtneKCYKOsUn0xoGAgfUJ','admin','ak_0d71a88704a9d274','2023-04-27 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$WeYHljYeWAm7AuEtuYgGYNRuGvITO2tLPbSPh.tAUt7U61nICAB.V','admin','ak_93cec102fc80d325','2023-05-17 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$.ow5B5TzSY8S3i3mRGykmLegQFLnUYlBLsmEH6J9gp75QwRycMN9P','user','ak_06db5841e8680c7b','2023-12-22 10:11:00',NULL);

