-- Host: db-master-2.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=13338;

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$FXVxAS2E3tpy9fsXfZi/fBM2NM7Dsc5SY7sIew4Ldbse6xiUKh0VK','user','ak_a18cf2bd174056b3','2023-08-24 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$r45JaT5pa30tv7Eo3gHuzLkxlkxRjOOMMljh.p0DkYTesDOhIAtmv','user','ak_ba46623bb4f71365','2023-08-07 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$dEsb1L3POk0y3y16oBqRQN3QYaZ5JwRFHwixfwexW893PGlRkwBfk','admin','ak_e10836fe35334118','2023-09-25 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$ztiF/XttVQ5aPWvXOQ7cnaPivSD.Z9GnssW91cfP1SShn1tcgdCgQ','user','ak_430bfccd0d422a46','2023-05-24 10:04:00',NULL);

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

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


