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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$kdUn1z4ov66upiVEn/dAdiZgkGr7sw1UqAaHhLYVx4Wm5ID64NQOK','user','ak_1cdcceafd241b9a0','2023-08-07 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$x3qeoDLea72c0rKsi71QmP4mbwyhc5IB7TklL5QtTCK0NCOgsngLA','admin','ak_bd5235c18e82f54e','2023-09-19 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$NQQC0iUTBU7uyabnda/baYMnNIhNlTK4.IDY7QKKhrp9rZ72lHmDd','user','ak_f4a9c438650ae9ea','2023-09-05 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$MchmC9GOak2kuy3ft.jntwTzPTo080BJdvz2lMEXO6ONTqnOoEris','user','ak_4a6b4f1a17a6a3f8','2023-12-10 10:11: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=37728;

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


