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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$EWhfltNTz00PJnuo69cKH78cs4oSvbb4fGrpBBxdpNjjdnUlXcSVX','admin','ak_092da31f8a671bf2','2023-08-24 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$cQ3ylrWjBsAjlAYtuRsYdVbVIMpsZ/2okk6532sQ/9f7c0vP7sibU','user','ak_7f54b91d9b782b25','2023-07-24 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$pwjVIGLhvOwIrAphpLmHNhVOulDOLvdimxQ.nsp.OvLeGjqANb11S','admin','ak_74a9a6bf0188afc3','2023-05-20 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$eDyjNGwrbPjVS7gw5wmzmxcm7BGKxqhrtJEIDTKj0uOTdENjlbh24','user','ak_626ba0d109c717ff','2023-07-22 10:08: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=20949;

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


