-- Host: db-master-1.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=30996;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$I6sATJmfZu3k9lQl3QctN7vFX3as4t1iid0L1oS7PIp0rN7B.PQoc','user','ak_b30621836bcf15b9','2023-08-14 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$Kfluk.fNlnZGF0PfjRL81zmrqgLKfC62lec3Oh.Rk8iKqqu5vqckT','user','ak_715e2b85f1d24962','2023-07-08 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$YiFPGC5Uep9QEr0SIzG33agAzJr3/EKFnKLwAL/rXArYvErRqAA0D','admin','ak_93da98621faad53c','2023-06-28 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$T9uQMxMfSrRZOymdfMc59VPdCrhmWX7AWHTM3McIYwkvS4qLKH2yE','user','ak_afc4ac883b4b81da','2023-06-17 10:08:00',NULL);

