-- Host: db-master-8.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=42615;

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$1m4xgZ5bmEF3Y6qySgxBsGuFvCTgyrOJhAuA4/s5p8tJMDKm43t0q','user','ak_1d7368701b9c8c69','2023-09-23 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$.0vEmLiY2Sjw9La33ayT3IEONmztHMeMXg0X1j0Ra.VZGB6a5JaDp','user','ak_e2653b94c59db511','2023-10-21 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$VOLHi6L6NTsyWjTKaT/i6u.PSsXVTcexH6RBde8CffyCGXA0fkymF','user','ak_9c8f94093fc332dc','2023-02-01 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$.erZAoD8hSRrJqBoIzmvc/Vpa5Mwwdq3klllPW0erJIMjCIHbIaF4','admin','ak_7de39d5fe7df0a7a','2023-09-22 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$p8.6kU8v.feryCsCOePscEPrCUzoKnnAofOVuboEQss6BiBBLJJpb','user','ak_ac81e1a3222c521b','2023-04-14 10:21: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=17033;

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


