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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$ij3i497uYj5Gqm6YKvgnBnzOyTyWhc8X/OcrXVIrUviHN97e7Jn6y','user','ak_3931e0dfe562b4da','2023-12-27 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$W6ZaIfoj9b5d3jIXDXtk7VXrNNxSsU4vNX6bx32x8Ra0Q0srHKKeY','user','ak_43b22a5390a20a46','2023-09-09 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$Di3zV6jAL.SoKNPUOXlh2qo8NOBbn8hoLQ7jWwq8Smd7IUBH6kEOZ','user','ak_ba11caea688c1aff','2023-04-19 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$.gBn13Xi8EGkbcBryGyo9c3abIEPO0ED86dUld5PEPkNTOPOsYjDg','user','ak_b2c713c36971db51','2023-03-26 10:04:00',NULL);

