-- Host: db-master-1.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=32801;

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$5CAyucF9wtEFzdWeqDSbkoJJoynkepwHzRRCBhCj4OFpCCUMoXKUd','user','ak_177b4b7fd178b85c','2023-12-28 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$Y1q2jmLcJLoF2XkOPW33Vwg1Uy9dajQUJonpIVIpbHd8v9ShlJrK1','user','ak_c6e9ae7adf67d878','2023-10-26 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$gLSsFSvR1HWN/4Af5xAj0XKgCF/ZvQyhH3I1tnezv0iVlb9G5xTP3','user','ak_2df6b879cb4f7f2e','2023-05-18 10:23: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=38017;

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


