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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$moBo2dTg7pCz4Q5otOmX4mIkB0ypj3yMfuGaqmzOE6/MWeOKMyrx9','user','ak_ebf8021fd2151dd8','2023-11-09 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$VKwvUuo3oSs5/25hlp83E0hz3D7vbJYJam96oWTGbSKJAlTEfe302','admin','ak_14475f92ce0da114','2023-09-20 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$lmzMU4ROZQNUnKzic9/YijPdzfK/3GsOv3GYR/4OQGnUMeMlnfRAp','user','ak_ec11c076d36bf3e0','2023-05-23 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$SKYDI4ElPSReBH6nqftZBLghhmbjYNSOUYWQwP/pggueOPFBp0fcE','user','ak_67ab815653bb9af0','2023-04-20 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$gHgtZShNKrFrfSGUZ9iExpYA546Qb4NkwdZuitdb50rfwqrVS11Td','user','ak_027dce52c1bb2d4b','2023-02-08 10:10:00',NULL);

