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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$.YrD8c1ZAIXmhwlKTPTm56NV1n.OUp8Hrv6VFNgwp95J1LvqPBn.O','user','ak_7000ba1f873d502d','2023-05-15 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$KysJ82vetYs00fvSgic07Ht.3itevE1BhBJ/UsoKIBzZxGCzBeusf','user','ak_a216704ef4769627','2023-03-26 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$bLOf4EtL6J.AJN8QFyJagQQHihj6OXzPZqBFZHGX.wpQDRpbsu8Kz','user','ak_d681437cffdd226f','2023-09-03 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$oLlIkUA8WG8CgvugqfOerX8CESi9agc1HgyR29dLgRjV4zgTeUazs','user','ak_9412419613dea861','2023-11-02 10:12: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=6955;

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


