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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=6034;

--
-- Dumping data for table `products`
--


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$U0Vck9IFLkEhQevZLLH6pMG.R5cWxKZArrrzespdfxFfsEzEVge5r','admin','ak_de8ac98246a9921a','2023-03-10 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$J4LQ7zA2LCJPsOXl3NDwy7RAkuzG6UUUqr61B./.Uv0/dfaf1.KGR','admin','ak_7c4541101c7fd170','2023-04-03 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$Q3DGMgvJOvB6vZ5vKpiJexwYVPcyN/HmFHEznD/3qlqXRvelV5BVK','user','ak_452995aec541a5d5','2023-03-11 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$xBgoraTm/XRJy7YZpgg9LOxVoyNWlLq5ZqYzjq4qSyZ4/cJ45VXOz','user','ak_f291356e9e979116','2023-11-12 10:12:00',NULL);

