-- Host: db-master-4.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=42833;

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$wyYMwFfhBvkezbSzcLGANMuTVIrPTDNUJXPPEXa/2u8Bj3k.8f57Z','admin','ak_52e8bdff92ecb2ed','2023-06-03 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$eu8hzPxyLXI8awsbQkGJ.CnjxNouQpqHd.1o6fBFkCtzVQX7dVuqt','user','ak_9765e670f266494f','2023-10-17 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$X3OBWxlaqAsEHwDQWego8E7YfFfvG2NRkULU4AKve8/jWopnezKFa','admin','ak_00d3f5c0bb6ecad8','2023-07-02 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$nszzaaHDEQOkfKXAtoU6LL2nB/kN7HVFKY/fWE5CBLoFOX3UCH4st','admin','ak_7d811ebde00ddd75','2023-07-10 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$fRgxaMdodOhlHTBn6jrAHRued3xxEL75zY5YWQ61Wub3NjAZOvkiK','user','ak_22c9dd34da914d7f','2023-11-12 10:02:00',NULL);

