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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$UFXM9L6JPxTY/xPMJ5104.R6KpqLoBLufIlz0YGP1hlNyI6yVCFLH','admin','ak_041aaac18c10d8eb','2023-05-12 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$grSxcVlz4EXuRQLtMKMMCE3tRs3fcA.H.aOysUr3BUpO1jUoN6PPQ','user','ak_25608ac9c367f6f8','2023-11-13 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$L4E0QBddf6teCNO2ya0vx8qOgoNUMnGoTzYxs5pwj2CRVEzSX/VXM','admin','ak_d0e36282474edbe7','2023-05-24 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$/DPARazPSCwePXWWIQhb4FTjbpdNlv3IslzhxY9MZtsySWcfftVC6','user','ak_d456dee1c388e996','2023-11-19 10:09: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=37475;

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


