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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$4bWCTyTXuuQjh0ie7GKxRIRTlq6OwjUGKtRsAkAou2cCOyzX97eZE','user','ak_1862ab05d6f214f7','2023-07-01 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$zLnOnJGAYAic/VwxAkhQMDK544VaSZbrGKsqRq6oLTLSBnMQ769tc','user','ak_e965db45c57274ea','2023-12-03 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$SSZpzga.2qPfk4MDQ9yP88tq8sa1yuwmywLJ.H4w1BDIZUhbmceH1','admin','ak_46d239bcf7a4d20d','2023-11-22 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$uknMcbm6BxULHWq4/V5jjMO4al6Q4RmII6jVnAdxR.7pknRxSA9rm','user','ak_3fff5ad349d9e5f1','2023-04-15 10:05: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=33628;

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


