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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$WF6gsWsMtfYZiMLPMhq/xEtNbvgsh9xKOjU3aP5eQFYvMa/Mu31Hi','user','ak_48609f48bc545d8b','2023-11-08 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$/VXXUXX8dzhqAkYr2IXoZEeOLghpEnfQ5mriD0tzsaYtxMp0COfPQ','admin','ak_4507664aa106853c','2023-01-19 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$neBNBcbXiaIj8IVy3bq2hNwEIKw4wycPMFlCnckAGjkFwpav6rJXp','admin','ak_969860637254a6ad','2023-03-21 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$X3tqXC/CvjpxtWHt620/oCbAoT3iO8MnsA52dXo.GlXbNAsOW9m3a','user','ak_93adfd37d798bdd8','2023-07-14 10:01:00',NULL);

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

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


