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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$iWj/kZUN2ir.iuXZ/aC.nzcf0EUfp.FchESMI7h7Ht48i5yvwy7s3','user','ak_daaf731e05c8fd4d','2023-08-17 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$qRDuffq29VWyWBiMkMlN04a.eVbNWvJ8ENVnUwEm2//tMVqPQ/p2h','admin','ak_48dfcb9ea77e2117','2023-01-24 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$iAbqNx2n7r.MQpUrDJ5k5PQvoRBYN0uS5n5cVL456nVusx9flQuOC','user','ak_b880c000135e17fc','2023-05-16 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$Sy1T9KDU1fRNAwC4mI6baaXpZVMkQhJdJ6FhV3YzoYtJKhh6.42Xp','user','ak_2dbc8f24e9aa611c','2023-08-11 10:05:00',NULL);

