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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$JHbeA37PAzF7behvrMyd4Sf.Zr//LkinHcap1mk9o3tOvWvWtcY6W','user','ak_3787f903f460ffbf','2023-11-28 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$OQr4vd6cNbjjaFDVDuVjIP5oi64s1Fl5LQSngXF0jD74lViR.6iZu','user','ak_7273b860c20100ea','2023-12-25 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$EQ/Wj42FTxRXhabl00rb6IrfoHJfFCMsj2OF.PHOwCAng2KSqZhi5','user','ak_d9ed4f026b237980','2023-12-08 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$urCiDiLaS19LloBEET6ksmL4Ll6dBgjC8FhnA0rKdqVHATremzJbX','user','ak_e7544cfea3734047','2023-08-15 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$fxWz1rR/lxTXhc9BxMy1jQtDBRlJ4GtufpMzwmzvw0dNCNmsAP.6Q','admin','ak_345831b412c7f995','2023-11-11 10:07:00',NULL);

