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


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$X9rzQLnG0d5EsotBjU5.kHRZeyGq/6gC.XgqTj5WePsnN04yg9ZmU','user','ak_20e01cd666574dbb','2023-08-04 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$2lSZ9IDimZAE1JGy4./sQlmOrhPY8k3RAhkc73ySnCVhM1IEzdQOA','user','ak_e4eb9e31c3c5f47a','2023-12-24 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$FtJgWpMtxSBNOh/mr79E7T4CzVeuw5LUuKJjrCMhwl.fU7HTYXWli','user','ak_47118bc4cddeca34','2023-09-20 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$ZdMqjXpu8XkHvkin2KA3RVoJzS4qVkeOQLd5FM40sb.j8TPn5JaRx','user','ak_7757e1d08136bbe8','2023-11-04 10:14:00',NULL);

