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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$kWiyxrN51a4ba.JHAfUlekA2L98rnq5gV3XwFDnY6OuYleqE1u4wz','admin','ak_0bf72bc474374def','2023-04-20 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$bXyWMiJaF06kXn0aA3XSb4gTGgJriYdh1/TpOGCvHvTSG8OO/23I9','user','ak_925f1862fdad0259','2023-12-12 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$fgdlRUKWhiveC4CKU0IF5vb7yk5hIOA7UXRozZS8kKAfzJTh0y11n','user','ak_12a7fea709f3ad9c','2023-03-17 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$Z5KUbwmIdbgYOpGc4jML9j9nAbPo9lHxeSCCZj5tClGyoqaqUungR','user','ak_c863ae8593546c3d','2023-02-01 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$hXuAzv0iwF0LTyPhiGhwCx0UC9JyTGS.hPiAdoX.C3Wpn5YWP.Xzb','user','ak_b1a484bce3e672c3','2023-05-04 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$x7yVYsJsq2aGE6aCyvzWnwGVbshZqErccNj1S48fsgHR4r/jbXnM0','user','ak_cacae2cbb2e297a2','2023-08-24 10:04:00',NULL);
INSERT INTO `users` VALUES (7,'dev_ops@internal.io','$2b$12$7TCYkNDhc6nmf/awOOAXSaH06Hla0Mf4pLo5en8QB.tU7jgelQ6b8','user','ak_36489f4a6aadcaf3','2023-11-12 10:02:00',NULL);

