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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=39099;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$2.b4F8mGJjdpz7AeuABa/KtUV.zQnaJOY/59KubjHRZFWMA0rLBID','user','ak_6f6547932ab01d4c','2023-09-04 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$MVthyVNdodMY66kiRcDvP4ROzcN.Msvxv/sQg0a9SD4I8mmG6C99f','user','ak_46ae857a9d6b734b','2023-02-13 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$XDPe.StKIs7qPK1F8wKZ28Cq6ySRuSbAPIMQBgiEV6s/j0v1Bls9U','user','ak_bc59d9cb6fa80c31','2023-04-19 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$.TARC9RrBR3HHJaViebIDhZ07SS6C0dsxGV16zRqgopY1/3hPz5xl','admin','ak_f8f978e7a31c98a4','2023-05-28 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$AvUSE6g7xr3G19Ihd./sc7PQ4RMJIPIzhZdoz771rng7iNudqvxhw','user','ak_b0696b4fc489e9d8','2023-06-02 10:08:00',NULL);

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

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


