-- Host: db-master-9.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$tunfYiYAXkIog6LDgTY/SttAW2WXr5XYJnA3m5Tod3EwMtpb1NVYH','admin','ak_84a679feb5f5d664','2023-07-23 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$XNI3fSt9xjdw/6VtfPw/bu8nTSM1dUuDrYbeFuBECbF5zKUTvpvVZ','admin','ak_c306b02f20611126','2023-09-19 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$abmxuAld87OGYDJj7CqTUWJSYGMc0qcTAUgPd6ZVMnD/6lgb2mf6i','user','ak_caeff20553826a51','2023-12-26 10:00: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=20585;

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


