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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$LgIIyJE7BQD.ZBXX8WQj8ZpdjjQb57/o4KJkw66kdwJ1LmtUFCQu0','user','ak_fe580f89c41c3dd2','2023-11-21 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$o1JFP08sTFlwpP8O13XgUuypPBH.cRiiAS1GrSFQAIXaXHVye9ufo','user','ak_9f9f0f5b41967330','2023-08-24 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$Zfer78peV5iadN0tCt8UcpClvU8xfYyxY48gXvmqVS4vPl/pUets6','admin','ak_0c1c33fdfe5d3b93','2023-09-03 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$iRR.jtFsRjKwtzisEwgmXLK/n7KlQYdK6LzVYphIpyCsHNgYgRp7C','admin','ak_d0761aed81bfb25e','2023-10-28 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$O3iwLZ4wuiKzXoS0cZsGVdnI5GeAa35boQcbgQpL4CEhhkepN7KId','user','ak_2c5bc6e0e2826e83','2023-08-02 10:06: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=30621;

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


