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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$QtBwxQH0cM4QVSIGvUofLNAl9pp5rb/CEXv4N5ygLyBQmRM3ThHro','user','ak_7b788aac550a06e1','2023-11-26 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$/Dd6p/L41RP3glUJxccLmCZL6SR0o2JDYZN7ja/FqwgXujUOaSr25','admin','ak_dd445a5afa3b9a1c','2023-03-17 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$/wiYNOUx.2pvpHU4SzV7F1cLCn3I8LAcg5nzOiMUl2dKa8V27WA86','admin','ak_ba8ec7ebe4c8f5fd','2023-04-16 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$EfthIZ9QnDX2MFSLlgwF310xyLls7axYBjewK/L7GsN6xYDyVv95V','user','ak_c90f3aa104810bd8','2023-07-18 10:17:00',NULL);

