-- Host: db-master-6.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=33504;

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$bHYKfIQik0DlBip/pq/CHiN88FEWR6k/oiH0w2x3YGbj5t8U17ldQ','user','ak_1797b8af3a0a0a2c','2023-10-05 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$jmV.JQ/SDTS4thSilHdP0CKsIpOM.RH13XbXjEH7ZL8mNxQVqsXfd','user','ak_b044315c4cd62254','2023-08-02 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$O2BsrxK2QjZgtdnQB6ZMJXoXExrWBoTd2kQZVDxccFzS/oJwIAxJr','user','ak_4a92f9c98d758a31','2023-09-18 10:00:00',NULL);

