-- Host: db-master-3.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$p4vLANGbOGa6O43YPSZ35LkrxjnXY7pDEBaj7ZN5Cn.LyLEe3MDow','user','ak_86caab0f9a1b85b2','2023-09-01 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$IkdS8ZfeaMqcTRGy/rcqZITe4vrIAlrVYGN3T2iuODq2kGhqlX8Rl','user','ak_305b3f5283e6b38f','2023-01-03 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$PBfugqlMxyldRz3xLHjULzsfLqMS3nWZosp4xAozB6Tu4cshRfpJ5','admin','ak_0ca42e8654fb5fb2','2023-02-24 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$WID2UiPVYx1o2KAuMGxE./lQ2s3GxwfcyQB1rx8Z9F0BNibQKhn1O','user','ak_e966fb18e7af5f02','2023-04-13 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$uhF1dDuteLA19aXe3ATulXXr668wDPV8k811ZpgPw9rMEa0en12bq','admin','ak_0fb46c051b65b854','2023-10-15 10:21:00',NULL);

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

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


