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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$KYfTDDPjF8k8ksDxcLFsEPlcy6sBfBD/bJixqsfjj17jFblRDIE6E','user','ak_6f69a42f1ef7ac06','2023-11-09 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$NHDipRb1OOr8dwMXgZDf.DA56LWTfs3nXXtPrkU2g7NHn9wCXuNvy','user','ak_f29e8ba5a3944b51','2023-11-19 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$2obsB384OocCIyNJnf6dRUEcRdyRpTpz5ezdLgOUjIvHsHfz1tZ8I','admin','ak_57374724149332cb','2023-07-04 10:10:00',NULL);

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

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


