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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$jXWUEra2XtUGJuoonIbn3S7j/tzJdHuKS643yUFcD9wgt.FCU1vHU','user','ak_ecb3a94cf6483a5a','2023-03-19 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$q6CiimsNa5OIbD4LuCQ38hcKMm1bEcDoaO1rLhDjnsf7/QbCnDt2n','user','ak_7bf853e2d14e2868','2023-02-22 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$9uIenZpuqck.9VKiKEWSySfD4F.wJpuxnE40H4SUL2UPgVZhLsEJP','user','ak_bb55db5327d98811','2023-04-11 10:19:00',NULL);

