-- MariaDB dump 10.19  Distrib 10.4.32-MariaDB, for Win64 (AMD64)
--
-- Host: localhost    Database: keska_panel
-- ------------------------------------------------------
-- Server version	10.4.32-MariaDB

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `cache`
--

DROP TABLE IF EXISTS `cache`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL,
  PRIMARY KEY (`key`),
  KEY `cache_expiration_index` (`expiration`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cache`
--

LOCK TABLES `cache` WRITE;
/*!40000 ALTER TABLE `cache` DISABLE KEYS */;
INSERT INTO `cache` VALUES ('keska-muhendislik-cache-admin@admin.com|::1','i:1;',1773521532),('keska-muhendislik-cache-admin@admin.com|::1:timer','i:1773521532;',1773521532),('keska-muhendislik-cache-admin@keska.com|::1','i:1;',1773587247),('keska-muhendislik-cache-admin@keska.com|::1:timer','i:1773587247;',1773587247),('keska-muhendislik-cache-admin@keska.com|127.0.0.1','i:1;',1773512699),('keska-muhendislik-cache-admin@keska.com|127.0.0.1:timer','i:1773512699;',1773512699),('keska-muhendislik-cache-admin@keska.local|::1','i:1;',1773587241),('keska-muhendislik-cache-admin@keska.local|::1:timer','i:1773587241;',1773587241),('keska-muhendislik-cache-spatie.permission.cache','a:3:{s:5:\"alias\";a:4:{s:1:\"a\";s:2:\"id\";s:1:\"b\";s:4:\"name\";s:1:\"c\";s:10:\"guard_name\";s:1:\"r\";s:5:\"roles\";}s:11:\"permissions\";a:59:{i:0;a:4:{s:1:\"a\";i:1;s:1:\"b\";s:14:\"dashboard.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:10:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;i:9;i:10;}}i:1;a:4:{s:1:\"a\";i:2;s:1:\"b\";s:10:\"users.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:2;a:4:{s:1:\"a\";i:3;s:1:\"b\";s:12:\"users.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:3;a:4:{s:1:\"a\";i:4;s:1:\"b\";s:10:\"users.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:4;a:4:{s:1:\"a\";i:5;s:1:\"b\";s:12:\"users.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:5;a:4:{s:1:\"a\";i:6;s:1:\"b\";s:16:\"departments.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:6;a:4:{s:1:\"a\";i:7;s:1:\"b\";s:18:\"departments.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:7;a:4:{s:1:\"a\";i:8;s:1:\"b\";s:16:\"departments.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:8;a:4:{s:1:\"a\";i:9;s:1:\"b\";s:18:\"departments.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:9;a:4:{s:1:\"a\";i:10;s:1:\"b\";s:10:\"teams.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;}}i:10;a:4:{s:1:\"a\";i:11;s:1:\"b\";s:12:\"teams.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:11;a:4:{s:1:\"a\";i:12;s:1:\"b\";s:10:\"teams.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:12;a:4:{s:1:\"a\";i:13;s:1:\"b\";s:12:\"teams.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:13;a:4:{s:1:\"a\";i:14;s:1:\"b\";s:14:\"personnel.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}i:14;a:4:{s:1:\"a\";i:15;s:1:\"b\";s:16:\"personnel.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:15;a:4:{s:1:\"a\";i:16;s:1:\"b\";s:14:\"personnel.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:16;a:4:{s:1:\"a\";i:17;s:1:\"b\";s:16:\"personnel.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:17;a:4:{s:1:\"a\";i:18;s:1:\"b\";s:13:\"vehicles.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;}}i:18;a:4:{s:1:\"a\";i:19;s:1:\"b\";s:15:\"vehicles.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:19;a:4:{s:1:\"a\";i:20;s:1:\"b\";s:13:\"vehicles.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:4;}}i:20;a:4:{s:1:\"a\";i:21;s:1:\"b\";s:15:\"vehicles.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:21;a:4:{s:1:\"a\";i:22;s:1:\"b\";s:13:\"machines.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;}}i:22;a:4:{s:1:\"a\";i:23;s:1:\"b\";s:15:\"machines.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:23;a:4:{s:1:\"a\";i:24;s:1:\"b\";s:13:\"machines.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:4;}}i:24;a:4:{s:1:\"a\";i:25;s:1:\"b\";s:15:\"machines.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:25;a:4:{s:1:\"a\";i:26;s:1:\"b\";s:13:\"contacts.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:6;}}i:26;a:4:{s:1:\"a\";i:27;s:1:\"b\";s:15:\"contacts.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:6;}}i:27;a:4:{s:1:\"a\";i:28;s:1:\"b\";s:13:\"contacts.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:6;}}i:28;a:4:{s:1:\"a\";i:29;s:1:\"b\";s:15:\"contacts.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:6;}}i:29;a:4:{s:1:\"a\";i:30;s:1:\"b\";s:14:\"proposals.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:6;}}i:30;a:4:{s:1:\"a\";i:31;s:1:\"b\";s:16:\"proposals.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:31;a:4:{s:1:\"a\";i:32;s:1:\"b\";s:14:\"proposals.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:32;a:4:{s:1:\"a\";i:33;s:1:\"b\";s:16:\"proposals.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:33;a:4:{s:1:\"a\";i:34;s:1:\"b\";s:17:\"proposals.approve\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:34;a:4:{s:1:\"a\";i:35;s:1:\"b\";s:13:\"projects.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:7:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;i:4;i:6;i:5;i:7;i:6;i:8;}}i:35;a:4:{s:1:\"a\";i:36;s:1:\"b\";s:15:\"projects.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:36;a:4:{s:1:\"a\";i:37;s:1:\"b\";s:13:\"projects.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}i:37;a:4:{s:1:\"a\";i:38;s:1:\"b\";s:15:\"projects.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:38;a:4:{s:1:\"a\";i:39;s:1:\"b\";s:16:\"maintenance.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}i:39;a:4:{s:1:\"a\";i:40;s:1:\"b\";s:18:\"maintenance.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:4;}}i:40;a:4:{s:1:\"a\";i:41;s:1:\"b\";s:16:\"maintenance.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:4;}}i:41;a:4:{s:1:\"a\";i:42;s:1:\"b\";s:18:\"maintenance.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:4;}}i:42;a:4:{s:1:\"a\";i:43;s:1:\"b\";s:23:\"maintenance_detail.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:4;}}i:43;a:4:{s:1:\"a\";i:44;s:1:\"b\";s:11:\"expert.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:4;}}i:44;a:4:{s:1:\"a\";i:45;s:1:\"b\";s:13:\"expert.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:4;}}i:45;a:4:{s:1:\"a\";i:46;s:1:\"b\";s:11:\"expert.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:4;}}i:46;a:4:{s:1:\"a\";i:47;s:1:\"b\";s:13:\"expert.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:47;a:4:{s:1:\"a\";i:48;s:1:\"b\";s:14:\"inventory.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:4;i:2;i:6;i:3;i:9;}}i:48;a:4:{s:1:\"a\";i:49;s:1:\"b\";s:16:\"inventory.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:4;i:2;i:6;i:3;i:9;}}i:49;a:4:{s:1:\"a\";i:50;s:1:\"b\";s:14:\"inventory.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:4;i:2;i:6;i:3;i:9;}}i:50;a:4:{s:1:\"a\";i:51;s:1:\"b\";s:16:\"inventory.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:9;}}i:51;a:4:{s:1:\"a\";i:52;s:1:\"b\";s:15:\"purchasing.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:4;i:2;i:6;i:3;i:9;}}i:52;a:4:{s:1:\"a\";i:53;s:1:\"b\";s:17:\"purchasing.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:4;i:2;i:6;i:3;i:9;}}i:53;a:4:{s:1:\"a\";i:54;s:1:\"b\";s:15:\"purchasing.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:6;}}i:54;a:4:{s:1:\"a\";i:55;s:1:\"b\";s:17:\"purchasing.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:55;a:4:{s:1:\"a\";i:56;s:1:\"b\";s:18:\"purchasing.approve\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:6;}}i:56;a:4:{s:1:\"a\";i:57;s:1:\"b\";s:12:\"reports.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:6:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:6;i:4;i:7;i:5;i:8;}}i:57;a:4:{s:1:\"a\";i:58;s:1:\"b\";s:13:\"settings.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:58;a:4:{s:1:\"a\";i:59;s:1:\"b\";s:13:\"settings.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}}s:5:\"roles\";a:10:{i:0;a:3:{s:1:\"a\";i:1;s:1:\"b\";s:5:\"Admin\";s:1:\"c\";s:3:\"web\";}i:1;a:3:{s:1:\"a\";i:2;s:1:\"b\";s:17:\"Proje Yöneticisi\";s:1:\"c\";s:3:\"web\";}i:2;a:3:{s:1:\"a\";i:3;s:1:\"b\";s:10:\"Saha Şefi\";s:1:\"c\";s:3:\"web\";}i:3;a:3:{s:1:\"a\";i:4;s:1:\"b\";s:12:\"Bakım Şefi\";s:1:\"c\";s:3:\"web\";}i:4;a:3:{s:1:\"a\";i:5;s:1:\"b\";s:14:\"Saha Personeli\";s:1:\"c\";s:3:\"web\";}i:5;a:3:{s:1:\"a\";i:6;s:1:\"b\";s:11:\"İdari-Mali\";s:1:\"c\";s:3:\"web\";}i:6;a:3:{s:1:\"a\";i:7;s:1:\"b\";s:11:\"Laboratuvar\";s:1:\"c\";s:3:\"web\";}i:7;a:3:{s:1:\"a\";i:8;s:1:\"b\";s:8:\"Jeofizik\";s:1:\"c\";s:3:\"web\";}i:8;a:3:{s:1:\"a\";i:9;s:1:\"b\";s:14:\"Depo Sorumlusu\";s:1:\"c\";s:3:\"web\";}i:9;a:3:{s:1:\"a\";i:10;s:1:\"b\";s:7:\"Misafir\";s:1:\"c\";s:3:\"web\";}}}',1773599075);
/*!40000 ALTER TABLE `cache` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cache_locks`
--

DROP TABLE IF EXISTS `cache_locks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL,
  PRIMARY KEY (`key`),
  KEY `cache_locks_expiration_index` (`expiration`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cache_locks`
--

LOCK TABLES `cache_locks` WRITE;
/*!40000 ALTER TABLE `cache_locks` DISABLE KEYS */;
/*!40000 ALTER TABLE `cache_locks` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cari_entries`
--

DROP TABLE IF EXISTS `cari_entries`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cari_entries` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `contact_id` bigint(20) unsigned NOT NULL,
  `project_id` bigint(20) unsigned DEFAULT NULL,
  `entry_type` varchar(255) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `description` text DEFAULT NULL,
  `entry_date` date NOT NULL,
  `is_settled` tinyint(1) NOT NULL DEFAULT 0,
  `settled_at` date DEFAULT NULL,
  `created_by` bigint(20) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cari_entries_contact_id_foreign` (`contact_id`),
  KEY `cari_entries_project_id_foreign` (`project_id`),
  KEY `cari_entries_created_by_foreign` (`created_by`),
  CONSTRAINT `cari_entries_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE,
  CONSTRAINT `cari_entries_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `cari_entries_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cari_entries`
--

LOCK TABLES `cari_entries` WRITE;
/*!40000 ALTER TABLE `cari_entries` DISABLE KEYS */;
INSERT INTO `cari_entries` VALUES (4,9,1,'borc',19000.00,'Proje sözleşme bedeli: HAMZA CAN','2026-03-14',0,NULL,1,'2026-03-14 18:31:27','2026-03-14 18:43:41'),(5,9,1,'tahsilat',15000.00,NULL,'2026-03-14',0,NULL,1,'2026-03-14 18:47:30','2026-03-14 18:47:30'),(6,4,1,'alacak',0.00,'Taşeron bedeli: HAMZA CAN','2026-03-15',0,NULL,1,'2026-03-15 09:03:59','2026-03-15 09:03:59');
/*!40000 ALTER TABLE `cari_entries` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `contact_addresses`
--

DROP TABLE IF EXISTS `contact_addresses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contact_addresses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `contact_id` bigint(20) unsigned NOT NULL,
  `label` varchar(255) NOT NULL,
  `address` text NOT NULL,
  `city` varchar(255) DEFAULT NULL,
  `district` varchar(255) DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `contact_addresses_contact_id_foreign` (`contact_id`),
  CONSTRAINT `contact_addresses_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `contact_addresses`
--

LOCK TABLES `contact_addresses` WRITE;
/*!40000 ALTER TABLE `contact_addresses` DISABLE KEYS */;
/*!40000 ALTER TABLE `contact_addresses` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `contacts`
--

DROP TABLE IF EXISTS `contacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contacts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `contact_subtype` varchar(255) NOT NULL DEFAULT 'kurumsal',
  `roles` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`roles`)),
  `company_name` varchar(255) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `contact_person` varchar(255) DEFAULT NULL,
  `tax_office` varchar(255) DEFAULT NULL,
  `tax_number` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `secondary_phone` varchar(20) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `district` varchar(255) DEFAULT NULL,
  `sector` varchar(255) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `contacts`
--

LOCK TABLES `contacts` WRITE;
/*!40000 ALTER TABLE `contacts` DISABLE KEYS */;
INSERT INTO `contacts` VALUES (1,'kurumsal','[\"musteri\"]','Özdemir İnşaat A.Ş.',NULL,'Ahmet Özdemir','Kocaeli Vergi Dairesi','1234567890','0262 555 11 22',NULL,'info@ozdemirinsaat.com',NULL,'Kocaeli','İzmit','İnşaat',NULL,1,'2026-03-14 16:30:14','2026-03-14 16:30:14'),(2,'bireysel','[\"musteri\"]','Mehmet Yılmaz',NULL,'Mehmet Yılmaz',NULL,NULL,'0532 444 22 33',NULL,'myilmaz@gmail.com',NULL,'Kocaeli','Gebze',NULL,NULL,1,'2026-03-14 16:30:14','2026-03-14 16:30:14'),(3,'kurumsal','[\"musteri\"]','Kaya Yapı Kooperatifi',NULL,'Fatma Kaya',NULL,NULL,'0262 333 77 88',NULL,NULL,NULL,'Kocaeli','Körfez','Konut',NULL,1,'2026-03-14 16:30:14','2026-03-14 16:30:14'),(4,'kurumsal','[\"taseron\"]','Akdeniz Sondaj Ltd. Şti.',NULL,'Kemal Arslan','Gebze Vergi Dairesi','9876543210','0262 611 44 55',NULL,'info@akdenizsondaj.com',NULL,'Kocaeli','Gebze','Sondaj',NULL,1,'2026-03-14 16:30:14','2026-03-14 16:30:14'),(5,'kurumsal','[\"tedarikci\"]','Teknik Ekipman A.Ş.',NULL,'Serkan Demir','Pendik Vergi Dairesi','5544332211','0216 777 88 99',NULL,'satis@teknikekipman.com',NULL,'İstanbul','Pendik','Ekipman',NULL,1,'2026-03-14 16:30:14','2026-03-14 16:30:14'),(6,'kurumsal','[\"taseron\",\"tedarikci\"]','Jeofizik Hizmetler A.Ş.',NULL,'Dr. Burak Çelik','Beşiktaş Vergi Dairesi','1122334455','0212 888 11 22',NULL,'info@jeofizik.com.tr',NULL,'İstanbul','Beşiktaş','Jeofizik',NULL,1,'2026-03-14 16:30:14','2026-03-14 16:30:14'),(7,'bireysel','[\"mimar\"]','Mimar Selma Öztürk',NULL,'Selma Öztürk',NULL,NULL,'0532 999 66 77',NULL,'selma@ozturkmimarlik.com',NULL,'Kocaeli','İzmit','Mimarlık',NULL,1,'2026-03-14 16:30:14','2026-03-14 16:30:14'),(8,'kurumsal','[\"musteri\"]','HASAN BAŞTAN_TAŞTAN MÜH',NULL,'HASAN BAŞTAN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-03-14 18:27:23','2026-03-14 18:28:02'),(9,'kurumsal','[\"musteri\"]','MURAT ÖZBAY',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-03-14 18:29:18','2026-03-14 18:29:18'),(10,'kurumsal','[\"musteri\"]','MY DİZAYN MİMARLIK',NULL,'MESUT YILMAZ',NULL,NULL,'+90 541 500 4152',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-03-15 12:53:02','2026-03-15 12:53:02');
/*!40000 ALTER TABLE `contacts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `departments`
--

DROP TABLE IF EXISTS `departments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `departments` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `manager_id` bigint(20) unsigned DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `departments_slug_unique` (`slug`),
  KEY `departments_manager_id_foreign` (`manager_id`),
  CONSTRAINT `departments_manager_id_foreign` FOREIGN KEY (`manager_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `departments`
--

LOCK TABLES `departments` WRITE;
/*!40000 ALTER TABLE `departments` DISABLE KEYS */;
INSERT INTO `departments` VALUES (1,'Saha Sondaj İmalat','saha-sondaj-imalat','Sondaj ve imalat operasyonları',NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(2,'Etüt ve Proje','etut-ve-proje','Etüt çalışmaları ve proje yönetimi',NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(3,'Jeofizik','jeofizik','Jeofizik araştırma ve ölçüm',NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(4,'İdari-Mali','idari-mali','İdari ve mali işler',NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(5,'Bakım Onarım','bakim-onarim','Araç ve makine bakım onarım',NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(6,'Laboratuvar','laboratuvar','Laboratuvar testleri ve analizleri',NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24');
/*!40000 ALTER TABLE `departments` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `expert_report_photos`
--

DROP TABLE IF EXISTS `expert_report_photos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `expert_report_photos` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `expert_report_id` bigint(20) unsigned NOT NULL,
  `file_path` varchar(255) NOT NULL,
  `caption` varchar(255) DEFAULT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `expert_report_photos_expert_report_id_foreign` (`expert_report_id`),
  CONSTRAINT `expert_report_photos_expert_report_id_foreign` FOREIGN KEY (`expert_report_id`) REFERENCES `expert_reports` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `expert_report_photos`
--

LOCK TABLES `expert_report_photos` WRITE;
/*!40000 ALTER TABLE `expert_report_photos` DISABLE KEYS */;
/*!40000 ALTER TABLE `expert_report_photos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `expert_reports`
--

DROP TABLE IF EXISTS `expert_reports`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `expert_reports` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `report_number` varchar(255) NOT NULL,
  `reportable_type` varchar(255) NOT NULL,
  `reportable_id` bigint(20) unsigned NOT NULL,
  `incident_date` date NOT NULL,
  `incident_location` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `damage_assessment` text DEFAULT NULL,
  `estimated_cost` decimal(15,2) DEFAULT NULL,
  `insurance_claim` tinyint(1) NOT NULL DEFAULT 0,
  `insurance_status` varchar(255) DEFAULT NULL,
  `reported_by` bigint(20) unsigned DEFAULT NULL,
  `expert_name` varchar(255) DEFAULT NULL,
  `status` enum('acik','inceleniyor','tamamlandi') NOT NULL DEFAULT 'acik',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `expert_reports_report_number_unique` (`report_number`),
  KEY `expert_reports_reportable_type_reportable_id_index` (`reportable_type`,`reportable_id`),
  KEY `expert_reports_reported_by_foreign` (`reported_by`),
  CONSTRAINT `expert_reports_reported_by_foreign` FOREIGN KEY (`reported_by`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `expert_reports`
--

LOCK TABLES `expert_reports` WRITE;
/*!40000 ALTER TABLE `expert_reports` DISABLE KEYS */;
/*!40000 ALTER TABLE `expert_reports` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `failed_jobs`
--

DROP TABLE IF EXISTS `failed_jobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `failed_jobs`
--

LOCK TABLES `failed_jobs` WRITE;
/*!40000 ALTER TABLE `failed_jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `failed_jobs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `inventory_categories`
--

DROP TABLE IF EXISTS `inventory_categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inventory_categories` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `parent_id` bigint(20) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inventory_categories_parent_id_foreign` (`parent_id`),
  CONSTRAINT `inventory_categories_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `inventory_categories` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `inventory_categories`
--

LOCK TABLES `inventory_categories` WRITE;
/*!40000 ALTER TABLE `inventory_categories` DISABLE KEYS */;
/*!40000 ALTER TABLE `inventory_categories` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `inventory_items`
--

DROP TABLE IF EXISTS `inventory_items`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inventory_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `category_id` bigint(20) unsigned DEFAULT NULL,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `unit` varchar(20) NOT NULL DEFAULT 'adet',
  `min_stock` decimal(10,2) NOT NULL DEFAULT 0.00,
  `current_stock` decimal(10,2) NOT NULL DEFAULT 0.00,
  `location` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `inventory_items_code_unique` (`code`),
  KEY `inventory_items_category_id_foreign` (`category_id`),
  CONSTRAINT `inventory_items_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `inventory_categories` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `inventory_items`
--

LOCK TABLES `inventory_items` WRITE;
/*!40000 ALTER TABLE `inventory_items` DISABLE KEYS */;
/*!40000 ALTER TABLE `inventory_items` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `inventory_movements`
--

DROP TABLE IF EXISTS `inventory_movements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inventory_movements` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `inventory_item_id` bigint(20) unsigned NOT NULL,
  `warehouse_id` bigint(20) unsigned DEFAULT NULL,
  `type` enum('giris','cikis','transfer','sayim') NOT NULL DEFAULT 'giris',
  `quantity` decimal(10,2) NOT NULL,
  `reference_type` varchar(255) DEFAULT NULL,
  `reference_id` bigint(20) unsigned DEFAULT NULL,
  `moved_by` bigint(20) unsigned DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inventory_movements_warehouse_id_foreign` (`warehouse_id`),
  KEY `inventory_movements_reference_type_reference_id_index` (`reference_type`,`reference_id`),
  KEY `inventory_movements_moved_by_foreign` (`moved_by`),
  KEY `inventory_movements_inventory_item_id_type_index` (`inventory_item_id`,`type`),
  CONSTRAINT `inventory_movements_inventory_item_id_foreign` FOREIGN KEY (`inventory_item_id`) REFERENCES `inventory_items` (`id`) ON DELETE CASCADE,
  CONSTRAINT `inventory_movements_moved_by_foreign` FOREIGN KEY (`moved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `inventory_movements_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `inventory_movements`
--

LOCK TABLES `inventory_movements` WRITE;
/*!40000 ALTER TABLE `inventory_movements` DISABLE KEYS */;
/*!40000 ALTER TABLE `inventory_movements` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `job_batches`
--

DROP TABLE IF EXISTS `job_batches`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `job_batches`
--

LOCK TABLES `job_batches` WRITE;
/*!40000 ALTER TABLE `job_batches` DISABLE KEYS */;
/*!40000 ALTER TABLE `job_batches` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `jobs`
--

DROP TABLE IF EXISTS `jobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) unsigned NOT NULL,
  `reserved_at` int(10) unsigned DEFAULT NULL,
  `available_at` int(10) unsigned NOT NULL,
  `created_at` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `jobs`
--

LOCK TABLES `jobs` WRITE;
/*!40000 ALTER TABLE `jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `jobs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `laboratory_samples`
--

DROP TABLE IF EXISTS `laboratory_samples`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `laboratory_samples` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `well_number` varchar(255) DEFAULT NULL,
  `depth_from` decimal(8,2) DEFAULT NULL,
  `depth_to` decimal(8,2) DEFAULT NULL,
  `sample_type` varchar(255) NOT NULL DEFAULT 'orselenmis',
  `test_types` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`test_types`)),
  `status` varchar(255) NOT NULL DEFAULT 'beklemede',
  `sent_at` date DEFAULT NULL,
  `cargo_company` varchar(255) DEFAULT NULL,
  `cargo_tracking_no` varchar(255) DEFAULT NULL,
  `results_received_at` date DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `laboratory_samples_project_id_foreign` (`project_id`),
  CONSTRAINT `laboratory_samples_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `laboratory_samples`
--

LOCK TABLES `laboratory_samples` WRITE;
/*!40000 ALTER TABLE `laboratory_samples` DISABLE KEYS */;
/*!40000 ALTER TABLE `laboratory_samples` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `machines`
--

DROP TABLE IF EXISTS `machines`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `machines` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `brand` varchar(255) DEFAULT NULL,
  `model` varchar(255) DEFAULT NULL,
  `serial_number` varchar(255) DEFAULT NULL,
  `year` year(4) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `status` enum('aktif','bakimda','arizali','pasif') NOT NULL DEFAULT 'aktif',
  `vehicle_id` bigint(20) unsigned DEFAULT NULL,
  `team_id` bigint(20) unsigned DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `machines_code_unique` (`code`),
  KEY `machines_vehicle_id_foreign` (`vehicle_id`),
  KEY `machines_team_id_foreign` (`team_id`),
  CONSTRAINT `machines_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE SET NULL,
  CONSTRAINT `machines_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `machines`
--

LOCK TABLES `machines` WRITE;
/*!40000 ALTER TABLE `machines` DISABLE KEYS */;
/*!40000 ALTER TABLE `machines` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `maintenance_parts`
--

DROP TABLE IF EXISTS `maintenance_parts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maintenance_parts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `maintenance_record_id` bigint(20) unsigned NOT NULL,
  `inventory_item_id` bigint(20) unsigned DEFAULT NULL,
  `part_name` varchar(255) NOT NULL,
  `quantity` decimal(10,2) NOT NULL DEFAULT 1.00,
  `unit_price` decimal(15,2) DEFAULT NULL,
  `total_price` decimal(15,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `maintenance_parts_maintenance_record_id_foreign` (`maintenance_record_id`),
  CONSTRAINT `maintenance_parts_maintenance_record_id_foreign` FOREIGN KEY (`maintenance_record_id`) REFERENCES `maintenance_records` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `maintenance_parts`
--

LOCK TABLES `maintenance_parts` WRITE;
/*!40000 ALTER TABLE `maintenance_parts` DISABLE KEYS */;
/*!40000 ALTER TABLE `maintenance_parts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `maintenance_records`
--

DROP TABLE IF EXISTS `maintenance_records`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maintenance_records` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `maintainable_type` varchar(255) NOT NULL,
  `maintainable_id` bigint(20) unsigned NOT NULL,
  `type` enum('periyodik','ariza','hasar','revizyon') NOT NULL DEFAULT 'ariza',
  `status` enum('planli','devam_ediyor','tamamlandi','iptal') NOT NULL DEFAULT 'planli',
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `reported_by` bigint(20) unsigned DEFAULT NULL,
  `assigned_to` bigint(20) unsigned DEFAULT NULL,
  `started_at` datetime DEFAULT NULL,
  `completed_at` datetime DEFAULT NULL,
  `cost` decimal(15,2) DEFAULT NULL,
  `vendor` varchar(255) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `maintenance_records_maintainable_type_maintainable_id_index` (`maintainable_type`,`maintainable_id`),
  KEY `maintenance_records_reported_by_foreign` (`reported_by`),
  KEY `maintenance_records_assigned_to_foreign` (`assigned_to`),
  KEY `maint_poly_status_idx` (`maintainable_type`,`maintainable_id`,`status`),
  CONSTRAINT `maintenance_records_assigned_to_foreign` FOREIGN KEY (`assigned_to`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `maintenance_records_reported_by_foreign` FOREIGN KEY (`reported_by`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `maintenance_records`
--

LOCK TABLES `maintenance_records` WRITE;
/*!40000 ALTER TABLE `maintenance_records` DISABLE KEYS */;
/*!40000 ALTER TABLE `maintenance_records` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `maintenance_schedules`
--

DROP TABLE IF EXISTS `maintenance_schedules`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maintenance_schedules` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `maintainable_type` varchar(255) NOT NULL,
  `maintainable_id` bigint(20) unsigned NOT NULL,
  `title` varchar(255) NOT NULL,
  `interval_type` enum('km','gun','ay') NOT NULL DEFAULT 'ay',
  `interval_value` int(11) NOT NULL,
  `last_performed_at` date DEFAULT NULL,
  `next_due_at` date DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `maintenance_schedules_maintainable_type_maintainable_id_index` (`maintainable_type`,`maintainable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `maintenance_schedules`
--

LOCK TABLES `maintenance_schedules` WRITE;
/*!40000 ALTER TABLE `maintenance_schedules` DISABLE KEYS */;
/*!40000 ALTER TABLE `maintenance_schedules` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `migrations`
--

DROP TABLE IF EXISTS `migrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `migrations`
--

LOCK TABLES `migrations` WRITE;
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
INSERT INTO `migrations` VALUES (1,'0001_01_01_000000_create_users_table',1),(2,'0001_01_01_000001_create_cache_table',1),(3,'0001_01_01_000002_create_jobs_table',1),(4,'2026_03_03_100001_create_departments_table',1),(5,'2026_03_03_100002_create_teams_table',1),(6,'2026_03_03_100003_create_team_members_table',1),(7,'2026_03_03_100004_create_personnel_table',1),(8,'2026_03_03_100005_create_vehicles_table',1),(9,'2026_03_03_100006_create_machines_table',1),(10,'2026_03_03_100007_create_contacts_table',1),(11,'2026_03_03_100008_create_proposals_table',1),(12,'2026_03_03_100009_create_projects_table',1),(13,'2026_03_03_100010_create_maintenance_tables',1),(14,'2026_03_03_100011_create_expert_reports_table',1),(15,'2026_03_03_100012_create_inventory_tables',1),(16,'2026_03_03_100013_create_purchasing_tables',1),(17,'2026_03_03_185728_create_permission_tables',1),(18,'2026_03_14_000001_create_field_work_and_cari_tables',2),(19,'2026_03_14_000002_add_ada_to_projects',3),(20,'2026_03_15_000001_create_laboratory_samples_table',4),(21,'2026_03_15_100001_create_settings_table',5),(22,'2026_03_15_200001_create_project_assignees_table',6);
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `model_has_permissions`
--

DROP TABLE IF EXISTS `model_has_permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `model_has_permissions` (
  `permission_id` bigint(20) unsigned NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`),
  CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `model_has_permissions`
--

LOCK TABLES `model_has_permissions` WRITE;
/*!40000 ALTER TABLE `model_has_permissions` DISABLE KEYS */;
/*!40000 ALTER TABLE `model_has_permissions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `model_has_roles`
--

DROP TABLE IF EXISTS `model_has_roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `model_has_roles` (
  `role_id` bigint(20) unsigned NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`),
  CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `model_has_roles`
--

LOCK TABLES `model_has_roles` WRITE;
/*!40000 ALTER TABLE `model_has_roles` DISABLE KEYS */;
INSERT INTO `model_has_roles` VALUES (1,'App\\Models\\User',1);
/*!40000 ALTER TABLE `model_has_roles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `password_reset_tokens`
--

DROP TABLE IF EXISTS `password_reset_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `password_reset_tokens`
--

LOCK TABLES `password_reset_tokens` WRITE;
/*!40000 ALTER TABLE `password_reset_tokens` DISABLE KEYS */;
/*!40000 ALTER TABLE `password_reset_tokens` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `permissions`
--

DROP TABLE IF EXISTS `permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `permissions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `permissions`
--

LOCK TABLES `permissions` WRITE;
/*!40000 ALTER TABLE `permissions` DISABLE KEYS */;
INSERT INTO `permissions` VALUES (1,'dashboard.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(2,'users.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(3,'users.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(4,'users.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(5,'users.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(6,'departments.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(7,'departments.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(8,'departments.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(9,'departments.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(10,'teams.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(11,'teams.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(12,'teams.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(13,'teams.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(14,'personnel.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(15,'personnel.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(16,'personnel.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(17,'personnel.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(18,'vehicles.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(19,'vehicles.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(20,'vehicles.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(21,'vehicles.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(22,'machines.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(23,'machines.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(24,'machines.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(25,'machines.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(26,'contacts.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(27,'contacts.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(28,'contacts.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(29,'contacts.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(30,'proposals.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(31,'proposals.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(32,'proposals.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(33,'proposals.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(34,'proposals.approve','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(35,'projects.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(36,'projects.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(37,'projects.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(38,'projects.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(39,'maintenance.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(40,'maintenance.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(41,'maintenance.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(42,'maintenance.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(43,'maintenance_detail.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(44,'expert.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(45,'expert.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(46,'expert.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(47,'expert.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(48,'inventory.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(49,'inventory.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(50,'inventory.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(51,'inventory.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(52,'purchasing.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(53,'purchasing.create','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(54,'purchasing.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(55,'purchasing.delete','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(56,'purchasing.approve','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(57,'reports.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(58,'settings.view','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(59,'settings.edit','web','2026-03-14 15:23:23','2026-03-14 15:23:23');
/*!40000 ALTER TABLE `permissions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `personnel`
--

DROP TABLE IF EXISTS `personnel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `personnel` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  `tc_no` varchar(11) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `position` varchar(255) DEFAULT NULL,
  `hire_date` date DEFAULT NULL,
  `birth_date` date DEFAULT NULL,
  `address` text DEFAULT NULL,
  `emergency_contact` varchar(255) DEFAULT NULL,
  `emergency_phone` varchar(20) DEFAULT NULL,
  `blood_type` varchar(10) DEFAULT NULL,
  `license_types` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`license_types`)),
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `personnel_tc_no_unique` (`tc_no`),
  KEY `personnel_user_id_foreign` (`user_id`),
  CONSTRAINT `personnel_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `personnel`
--

LOCK TABLES `personnel` WRITE;
/*!40000 ALTER TABLE `personnel` DISABLE KEYS */;
/*!40000 ALTER TABLE `personnel` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `personnel_documents`
--

DROP TABLE IF EXISTS `personnel_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `personnel_documents` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `personnel_id` bigint(20) unsigned NOT NULL,
  `type` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `file_path` varchar(255) NOT NULL,
  `expiry_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `personnel_documents_personnel_id_foreign` (`personnel_id`),
  CONSTRAINT `personnel_documents_personnel_id_foreign` FOREIGN KEY (`personnel_id`) REFERENCES `personnel` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `personnel_documents`
--

LOCK TABLES `personnel_documents` WRITE;
/*!40000 ALTER TABLE `personnel_documents` DISABLE KEYS */;
/*!40000 ALTER TABLE `personnel_documents` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_assignees`
--

DROP TABLE IF EXISTS `project_assignees`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_assignees` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `project_assignees_project_id_user_id_unique` (`project_id`,`user_id`),
  KEY `project_assignees_user_id_foreign` (`user_id`),
  CONSTRAINT `project_assignees_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  CONSTRAINT `project_assignees_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_assignees`
--

LOCK TABLES `project_assignees` WRITE;
/*!40000 ALTER TABLE `project_assignees` DISABLE KEYS */;
INSERT INTO `project_assignees` VALUES (1,1,1,NULL,NULL),(2,1,2,NULL,NULL);
/*!40000 ALTER TABLE `project_assignees` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_documents`
--

DROP TABLE IF EXISTS `project_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_documents` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `title` varchar(255) NOT NULL,
  `file_path` varchar(255) NOT NULL,
  `file_type` varchar(255) DEFAULT NULL,
  `file_size` bigint(20) unsigned DEFAULT NULL,
  `uploaded_by` bigint(20) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_documents_project_id_foreign` (`project_id`),
  KEY `project_documents_uploaded_by_foreign` (`uploaded_by`),
  CONSTRAINT `project_documents_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  CONSTRAINT `project_documents_uploaded_by_foreign` FOREIGN KEY (`uploaded_by`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_documents`
--

LOCK TABLES `project_documents` WRITE;
/*!40000 ALTER TABLE `project_documents` DISABLE KEYS */;
/*!40000 ALTER TABLE `project_documents` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_field_measurements`
--

DROP TABLE IF EXISTS `project_field_measurements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_field_measurements` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `field_work_log_id` bigint(20) unsigned NOT NULL,
  `measurement_type` varchar(255) NOT NULL,
  `count` int(11) NOT NULL DEFAULT 1,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_field_measurements_field_work_log_id_foreign` (`field_work_log_id`),
  CONSTRAINT `project_field_measurements_field_work_log_id_foreign` FOREIGN KEY (`field_work_log_id`) REFERENCES `project_field_work_logs` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_field_measurements`
--

LOCK TABLES `project_field_measurements` WRITE;
/*!40000 ALTER TABLE `project_field_measurements` DISABLE KEYS */;
INSERT INTO `project_field_measurements` VALUES (3,13,'DES',1,NULL,'2026-03-14 18:34:03','2026-03-14 18:34:03'),(4,14,'MASW',1,NULL,'2026-03-15 08:27:29','2026-03-15 08:27:29');
/*!40000 ALTER TABLE `project_field_measurements` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_field_wells`
--

DROP TABLE IF EXISTS `project_field_wells`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_field_wells` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `field_work_log_id` bigint(20) unsigned NOT NULL,
  `well_number` varchar(255) NOT NULL,
  `depth_meters` decimal(8,2) NOT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_field_wells_field_work_log_id_foreign` (`field_work_log_id`),
  CONSTRAINT `project_field_wells_field_work_log_id_foreign` FOREIGN KEY (`field_work_log_id`) REFERENCES `project_field_work_logs` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_field_wells`
--

LOCK TABLES `project_field_wells` WRITE;
/*!40000 ALTER TABLE `project_field_wells` DISABLE KEYS */;
INSERT INTO `project_field_wells` VALUES (6,11,'SK-1',20.00,NULL,'2026-03-14 18:33:23','2026-03-14 18:33:23'),(10,16,'SK-2',20.00,NULL,'2026-03-15 14:28:16','2026-03-15 14:28:16');
/*!40000 ALTER TABLE `project_field_wells` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_field_work_logs`
--

DROP TABLE IF EXISTS `project_field_work_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_field_work_logs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `work_date` date NOT NULL,
  `work_type` varchar(255) NOT NULL,
  `team_id` bigint(20) unsigned DEFAULT NULL,
  `vehicle_id` bigint(20) unsigned DEFAULT NULL,
  `machine_id` bigint(20) unsigned DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_by` bigint(20) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_field_work_logs_project_id_foreign` (`project_id`),
  KEY `project_field_work_logs_team_id_foreign` (`team_id`),
  KEY `project_field_work_logs_vehicle_id_foreign` (`vehicle_id`),
  KEY `project_field_work_logs_machine_id_foreign` (`machine_id`),
  KEY `project_field_work_logs_created_by_foreign` (`created_by`),
  CONSTRAINT `project_field_work_logs_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `project_field_work_logs_machine_id_foreign` FOREIGN KEY (`machine_id`) REFERENCES `machines` (`id`) ON DELETE SET NULL,
  CONSTRAINT `project_field_work_logs_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  CONSTRAINT `project_field_work_logs_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE SET NULL,
  CONSTRAINT `project_field_work_logs_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_field_work_logs`
--

LOCK TABLES `project_field_work_logs` WRITE;
/*!40000 ALTER TABLE `project_field_work_logs` DISABLE KEYS */;
INSERT INTO `project_field_work_logs` VALUES (11,1,'2026-03-12','sondaj',4,2,NULL,NULL,1,'2026-03-14 18:33:23','2026-03-14 18:33:23'),(13,1,'2026-03-12','jeofizik',8,NULL,NULL,NULL,1,'2026-03-14 18:34:03','2026-03-14 18:34:03'),(14,1,'2026-03-15','jeofizik',8,NULL,NULL,NULL,1,'2026-03-15 08:27:29','2026-03-15 08:27:29'),(16,1,'2026-03-15','sondaj',1,1,NULL,NULL,1,'2026-03-15 09:07:31','2026-03-15 09:07:31');
/*!40000 ALTER TABLE `project_field_work_logs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_machines`
--

DROP TABLE IF EXISTS `project_machines`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_machines` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `machine_id` bigint(20) unsigned NOT NULL,
  `assigned_at` date DEFAULT NULL,
  `removed_at` date DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_machines_project_id_foreign` (`project_id`),
  KEY `project_machines_machine_id_foreign` (`machine_id`),
  CONSTRAINT `project_machines_machine_id_foreign` FOREIGN KEY (`machine_id`) REFERENCES `machines` (`id`) ON DELETE CASCADE,
  CONSTRAINT `project_machines_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_machines`
--

LOCK TABLES `project_machines` WRITE;
/*!40000 ALTER TABLE `project_machines` DISABLE KEYS */;
/*!40000 ALTER TABLE `project_machines` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_notes`
--

DROP TABLE IF EXISTS `project_notes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_notes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  `content` text NOT NULL,
  `is_internal` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_notes_project_id_foreign` (`project_id`),
  KEY `project_notes_user_id_foreign` (`user_id`),
  CONSTRAINT `project_notes_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  CONSTRAINT `project_notes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_notes`
--

LOCK TABLES `project_notes` WRITE;
/*!40000 ALTER TABLE `project_notes` DISABLE KEYS */;
INSERT INTO `project_notes` VALUES (1,1,1,'Mimari proje talep edildi',0,'2026-03-15 14:21:34','2026-03-15 14:21:34');
/*!40000 ALTER TABLE `project_notes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_personnel`
--

DROP TABLE IF EXISTS `project_personnel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_personnel` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `personnel_id` bigint(20) unsigned NOT NULL,
  `role` varchar(255) DEFAULT NULL,
  `assigned_at` date DEFAULT NULL,
  `removed_at` date DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_personnel_project_id_foreign` (`project_id`),
  KEY `project_personnel_personnel_id_foreign` (`personnel_id`),
  CONSTRAINT `project_personnel_personnel_id_foreign` FOREIGN KEY (`personnel_id`) REFERENCES `personnel` (`id`) ON DELETE CASCADE,
  CONSTRAINT `project_personnel_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_personnel`
--

LOCK TABLES `project_personnel` WRITE;
/*!40000 ALTER TABLE `project_personnel` DISABLE KEYS */;
/*!40000 ALTER TABLE `project_personnel` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_planned_geophysics`
--

DROP TABLE IF EXISTS `project_planned_geophysics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_planned_geophysics` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `measurement_type` varchar(255) NOT NULL,
  `planned_count` int(11) NOT NULL DEFAULT 1,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_planned_geophysics_project_id_foreign` (`project_id`),
  CONSTRAINT `project_planned_geophysics_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_planned_geophysics`
--

LOCK TABLES `project_planned_geophysics` WRITE;
/*!40000 ALTER TABLE `project_planned_geophysics` DISABLE KEYS */;
INSERT INTO `project_planned_geophysics` VALUES (25,1,'MASW',1,NULL,'2026-03-15 09:03:59','2026-03-15 09:03:59'),(26,1,'DES',1,NULL,'2026-03-15 09:03:59','2026-03-15 09:03:59');
/*!40000 ALTER TABLE `project_planned_geophysics` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_planned_wells`
--

DROP TABLE IF EXISTS `project_planned_wells`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_planned_wells` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `well_number` varchar(255) NOT NULL,
  `planned_depth` decimal(8,2) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_planned_wells_project_id_foreign` (`project_id`),
  CONSTRAINT `project_planned_wells_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_planned_wells`
--

LOCK TABLES `project_planned_wells` WRITE;
/*!40000 ALTER TABLE `project_planned_wells` DISABLE KEYS */;
INSERT INTO `project_planned_wells` VALUES (32,1,'SK-1',20.00,NULL,'2026-03-15 09:03:59','2026-03-15 09:03:59'),(33,1,'SK-2',20.00,NULL,'2026-03-15 09:03:59','2026-03-15 09:03:59');
/*!40000 ALTER TABLE `project_planned_wells` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_teams`
--

DROP TABLE IF EXISTS `project_teams`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_teams` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `team_id` bigint(20) unsigned NOT NULL,
  `assigned_at` date DEFAULT NULL,
  `removed_at` date DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_teams_project_id_foreign` (`project_id`),
  KEY `project_teams_team_id_foreign` (`team_id`),
  CONSTRAINT `project_teams_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  CONSTRAINT `project_teams_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_teams`
--

LOCK TABLES `project_teams` WRITE;
/*!40000 ALTER TABLE `project_teams` DISABLE KEYS */;
/*!40000 ALTER TABLE `project_teams` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `project_vehicles`
--

DROP TABLE IF EXISTS `project_vehicles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_vehicles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `vehicle_id` bigint(20) unsigned NOT NULL,
  `assigned_at` date DEFAULT NULL,
  `removed_at` date DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `project_vehicles_project_id_foreign` (`project_id`),
  KEY `project_vehicles_vehicle_id_foreign` (`vehicle_id`),
  CONSTRAINT `project_vehicles_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  CONSTRAINT `project_vehicles_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `project_vehicles`
--

LOCK TABLES `project_vehicles` WRITE;
/*!40000 ALTER TABLE `project_vehicles` DISABLE KEYS */;
/*!40000 ALTER TABLE `project_vehicles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `projects`
--

DROP TABLE IF EXISTS `projects`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `projects` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_number` varchar(255) NOT NULL,
  `proposal_id` bigint(20) unsigned DEFAULT NULL,
  `contact_id` bigint(20) unsigned DEFAULT NULL,
  `third_party_id` bigint(20) unsigned DEFAULT NULL,
  `subcontractor_id` bigint(20) unsigned DEFAULT NULL,
  `has_subcontractor` tinyint(1) NOT NULL DEFAULT 0,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `tags` varchar(255) DEFAULT NULL,
  `visibility` varchar(255) NOT NULL DEFAULT 'herkes',
  `status` varchar(255) NOT NULL DEFAULT 'evrak_asamasi',
  `job_type` varchar(255) NOT NULL DEFAULT 'proje',
  `offer_file_no` varchar(255) DEFAULT NULL,
  `urgency` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `district` varchar(255) DEFAULT NULL,
  `neighborhood` varchar(255) DEFAULT NULL,
  `ada` varchar(255) DEFAULT NULL,
  `parcel` varchar(255) DEFAULT NULL,
  `area_m2` decimal(10,2) DEFAULT NULL,
  `incoming_documents` text DEFAULT NULL,
  `architectural_project_status` varchar(255) DEFAULT NULL,
  `report_writing_hours` decimal(6,2) DEFAULT NULL,
  `ownership_reference` varchar(255) DEFAULT NULL,
  `customer_info_message` text DEFAULT NULL,
  `report_delivery` text DEFAULT NULL,
  `project_responsible_id` bigint(20) unsigned DEFAULT NULL,
  `project_supervisor_id` bigint(20) unsigned DEFAULT NULL,
  `manager_id` bigint(20) unsigned DEFAULT NULL,
  `planned_work_count` int(11) DEFAULT NULL,
  `drilling_days_per_machine` int(11) DEFAULT NULL,
  `drilling_start_planned` date DEFAULT NULL,
  `drilling_team_planned` varchar(255) DEFAULT NULL,
  `drilling_note` text DEFAULT NULL,
  `geophysics_start_planned` date DEFAULT NULL,
  `geophysics_team_planned` varchar(255) DEFAULT NULL,
  `geophysics_note` text DEFAULT NULL,
  `drilling_info` varchar(255) DEFAULT NULL,
  `drilling_completed` tinyint(1) NOT NULL DEFAULT 0,
  `geophysics_info` varchar(255) DEFAULT NULL,
  `geophysics_completed` tinyint(1) NOT NULL DEFAULT 0,
  `pressuremeter_info` varchar(255) DEFAULT NULL,
  `pressuremeter_completed` tinyint(1) NOT NULL DEFAULT 0,
  `payment_plan` text DEFAULT NULL,
  `ledger_processed` tinyint(1) NOT NULL DEFAULT 0,
  `progress_payment` decimal(15,2) DEFAULT NULL,
  `contract_amount` decimal(15,2) DEFAULT NULL,
  `subcontractor_amount` decimal(15,2) DEFAULT NULL,
  `invoice_no` varchar(255) DEFAULT NULL,
  `geology_engineer_id` bigint(20) unsigned DEFAULT NULL,
  `civil_engineer_id` bigint(20) unsigned DEFAULT NULL,
  `geotechnical_engineer_id` bigint(20) unsigned DEFAULT NULL,
  `planned_start` date DEFAULT NULL,
  `planned_end` date DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `projects_project_number_unique` (`project_number`),
  KEY `projects_proposal_id_foreign` (`proposal_id`),
  KEY `projects_contact_id_foreign` (`contact_id`),
  KEY `projects_third_party_id_foreign` (`third_party_id`),
  KEY `projects_subcontractor_id_foreign` (`subcontractor_id`),
  KEY `projects_project_responsible_id_foreign` (`project_responsible_id`),
  KEY `projects_project_supervisor_id_foreign` (`project_supervisor_id`),
  KEY `projects_manager_id_foreign` (`manager_id`),
  KEY `projects_geology_engineer_id_foreign` (`geology_engineer_id`),
  KEY `projects_civil_engineer_id_foreign` (`civil_engineer_id`),
  KEY `projects_geotechnical_engineer_id_foreign` (`geotechnical_engineer_id`),
  CONSTRAINT `projects_civil_engineer_id_foreign` FOREIGN KEY (`civil_engineer_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `projects_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  CONSTRAINT `projects_geology_engineer_id_foreign` FOREIGN KEY (`geology_engineer_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `projects_geotechnical_engineer_id_foreign` FOREIGN KEY (`geotechnical_engineer_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `projects_manager_id_foreign` FOREIGN KEY (`manager_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `projects_project_responsible_id_foreign` FOREIGN KEY (`project_responsible_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `projects_project_supervisor_id_foreign` FOREIGN KEY (`project_supervisor_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `projects_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE SET NULL,
  CONSTRAINT `projects_subcontractor_id_foreign` FOREIGN KEY (`subcontractor_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  CONSTRAINT `projects_third_party_id_foreign` FOREIGN KEY (`third_party_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `projects`
--

LOCK TABLES `projects` WRITE;
/*!40000 ALTER TABLE `projects` DISABLE KEYS */;
INSERT INTO `projects` VALUES (1,'KP03207',NULL,9,NULL,4,0,'HAMZA CAN',NULL,NULL,'atananlar','saha_calismalari_tamamlandi','proje','4079','Normal','Kocaeli','Başiskele','Yuvacık','910','15',NULL,NULL,'bekliyor',3.00,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,19000.00,0.00,NULL,NULL,NULL,NULL,'2026-03-09',NULL,'[]','2026-03-14 15:27:07','2026-03-15 09:03:59'),(2,'KP03197',NULL,10,NULL,NULL,0,'MUHAMMET ÖZBAY VE HİSS.',NULL,NULL,'herkes','evrak_asamasi','proje',NULL,NULL,'Kocaeli','Başiskele','Mahmutpaşa','410','1',514.06,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2026-03-03',NULL,NULL,'2026-03-15 12:57:44','2026-03-15 12:57:44');
/*!40000 ALTER TABLE `projects` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `proposal_documents`
--

DROP TABLE IF EXISTS `proposal_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `proposal_documents` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `proposal_id` bigint(20) unsigned NOT NULL,
  `title` varchar(255) NOT NULL,
  `file_path` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `proposal_documents_proposal_id_foreign` (`proposal_id`),
  CONSTRAINT `proposal_documents_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `proposal_documents`
--

LOCK TABLES `proposal_documents` WRITE;
/*!40000 ALTER TABLE `proposal_documents` DISABLE KEYS */;
/*!40000 ALTER TABLE `proposal_documents` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `proposal_items`
--

DROP TABLE IF EXISTS `proposal_items`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `proposal_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `proposal_id` bigint(20) unsigned NOT NULL,
  `description` varchar(255) NOT NULL,
  `unit` varchar(20) DEFAULT NULL,
  `quantity` decimal(12,2) NOT NULL DEFAULT 1.00,
  `unit_price` decimal(15,2) NOT NULL DEFAULT 0.00,
  `total_price` decimal(15,2) NOT NULL DEFAULT 0.00,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `proposal_items_proposal_id_foreign` (`proposal_id`),
  CONSTRAINT `proposal_items_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `proposal_items`
--

LOCK TABLES `proposal_items` WRITE;
/*!40000 ALTER TABLE `proposal_items` DISABLE KEYS */;
/*!40000 ALTER TABLE `proposal_items` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `proposal_revisions`
--

DROP TABLE IF EXISTS `proposal_revisions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `proposal_revisions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `proposal_id` bigint(20) unsigned NOT NULL,
  `revision_number` int(11) NOT NULL,
  `changes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`changes`)),
  `notes` text DEFAULT NULL,
  `revised_by` bigint(20) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `proposal_revisions_proposal_id_foreign` (`proposal_id`),
  KEY `proposal_revisions_revised_by_foreign` (`revised_by`),
  CONSTRAINT `proposal_revisions_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE CASCADE,
  CONSTRAINT `proposal_revisions_revised_by_foreign` FOREIGN KEY (`revised_by`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `proposal_revisions`
--

LOCK TABLES `proposal_revisions` WRITE;
/*!40000 ALTER TABLE `proposal_revisions` DISABLE KEYS */;
/*!40000 ALTER TABLE `proposal_revisions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `proposals`
--

DROP TABLE IF EXISTS `proposals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `proposals` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `proposal_number` varchar(255) NOT NULL,
  `contact_id` bigint(20) unsigned DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `status` enum('talep','kesif','taslak','revizyon','gonderildi','onaylandi','reddedildi','proje_oldu') NOT NULL DEFAULT 'talep',
  `requested_at` date DEFAULT NULL,
  `survey_date` date DEFAULT NULL,
  `survey_notes` text DEFAULT NULL,
  `submitted_at` date DEFAULT NULL,
  `approved_at` date DEFAULT NULL,
  `rejected_at` date DEFAULT NULL,
  `rejection_reason` text DEFAULT NULL,
  `total_amount` decimal(15,2) DEFAULT NULL,
  `currency` varchar(10) NOT NULL DEFAULT 'TRY',
  `validity_days` int(11) NOT NULL DEFAULT 30,
  `prepared_by` bigint(20) unsigned DEFAULT NULL,
  `approved_by` bigint(20) unsigned DEFAULT NULL,
  `project_id` bigint(20) unsigned DEFAULT NULL,
  `revision_count` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `proposals_proposal_number_unique` (`proposal_number`),
  KEY `proposals_contact_id_foreign` (`contact_id`),
  KEY `proposals_prepared_by_foreign` (`prepared_by`),
  KEY `proposals_approved_by_foreign` (`approved_by`),
  CONSTRAINT `proposals_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `proposals_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  CONSTRAINT `proposals_prepared_by_foreign` FOREIGN KEY (`prepared_by`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `proposals`
--

LOCK TABLES `proposals` WRITE;
/*!40000 ALTER TABLE `proposals` DISABLE KEYS */;
/*!40000 ALTER TABLE `proposals` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `purchase_order_items`
--

DROP TABLE IF EXISTS `purchase_order_items`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `purchase_order_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `purchase_order_id` bigint(20) unsigned NOT NULL,
  `purchase_request_item_id` bigint(20) unsigned DEFAULT NULL,
  `description` varchar(255) NOT NULL,
  `quantity` decimal(10,2) NOT NULL DEFAULT 1.00,
  `unit` varchar(20) NOT NULL DEFAULT 'adet',
  `unit_price` decimal(15,2) NOT NULL DEFAULT 0.00,
  `total_price` decimal(15,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `purchase_order_items_purchase_order_id_foreign` (`purchase_order_id`),
  KEY `purchase_order_items_purchase_request_item_id_foreign` (`purchase_request_item_id`),
  CONSTRAINT `purchase_order_items_purchase_order_id_foreign` FOREIGN KEY (`purchase_order_id`) REFERENCES `purchase_orders` (`id`) ON DELETE CASCADE,
  CONSTRAINT `purchase_order_items_purchase_request_item_id_foreign` FOREIGN KEY (`purchase_request_item_id`) REFERENCES `purchase_request_items` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `purchase_order_items`
--

LOCK TABLES `purchase_order_items` WRITE;
/*!40000 ALTER TABLE `purchase_order_items` DISABLE KEYS */;
/*!40000 ALTER TABLE `purchase_order_items` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `purchase_orders`
--

DROP TABLE IF EXISTS `purchase_orders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `purchase_orders` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `order_number` varchar(255) NOT NULL,
  `purchase_request_id` bigint(20) unsigned DEFAULT NULL,
  `contact_id` bigint(20) unsigned DEFAULT NULL,
  `ordered_by` bigint(20) unsigned NOT NULL,
  `status` enum('siparis_edildi','kismen_teslim','teslim_alindi','iptal') NOT NULL DEFAULT 'siparis_edildi',
  `total_amount` decimal(15,2) DEFAULT NULL,
  `order_date` date DEFAULT NULL,
  `expected_delivery` date DEFAULT NULL,
  `actual_delivery` date DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `purchase_orders_order_number_unique` (`order_number`),
  KEY `purchase_orders_purchase_request_id_foreign` (`purchase_request_id`),
  KEY `purchase_orders_contact_id_foreign` (`contact_id`),
  KEY `purchase_orders_ordered_by_foreign` (`ordered_by`),
  CONSTRAINT `purchase_orders_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  CONSTRAINT `purchase_orders_ordered_by_foreign` FOREIGN KEY (`ordered_by`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  CONSTRAINT `purchase_orders_purchase_request_id_foreign` FOREIGN KEY (`purchase_request_id`) REFERENCES `purchase_requests` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `purchase_orders`
--

LOCK TABLES `purchase_orders` WRITE;
/*!40000 ALTER TABLE `purchase_orders` DISABLE KEYS */;
/*!40000 ALTER TABLE `purchase_orders` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `purchase_request_items`
--

DROP TABLE IF EXISTS `purchase_request_items`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `purchase_request_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `purchase_request_id` bigint(20) unsigned NOT NULL,
  `inventory_item_id` bigint(20) unsigned DEFAULT NULL,
  `description` varchar(255) NOT NULL,
  `quantity` decimal(10,2) NOT NULL DEFAULT 1.00,
  `unit` varchar(20) NOT NULL DEFAULT 'adet',
  `estimated_price` decimal(15,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `purchase_request_items_purchase_request_id_foreign` (`purchase_request_id`),
  KEY `purchase_request_items_inventory_item_id_foreign` (`inventory_item_id`),
  CONSTRAINT `purchase_request_items_inventory_item_id_foreign` FOREIGN KEY (`inventory_item_id`) REFERENCES `inventory_items` (`id`) ON DELETE SET NULL,
  CONSTRAINT `purchase_request_items_purchase_request_id_foreign` FOREIGN KEY (`purchase_request_id`) REFERENCES `purchase_requests` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `purchase_request_items`
--

LOCK TABLES `purchase_request_items` WRITE;
/*!40000 ALTER TABLE `purchase_request_items` DISABLE KEYS */;
/*!40000 ALTER TABLE `purchase_request_items` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `purchase_requests`
--

DROP TABLE IF EXISTS `purchase_requests`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `purchase_requests` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `request_number` varchar(255) NOT NULL,
  `requested_by` bigint(20) unsigned NOT NULL,
  `project_id` bigint(20) unsigned DEFAULT NULL,
  `department_id` bigint(20) unsigned DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `priority` enum('dusuk','normal','yuksek','acil') NOT NULL DEFAULT 'normal',
  `status` enum('taslak','onay_bekliyor','onaylandi','reddedildi','siparis_edildi','teslim_alindi') NOT NULL DEFAULT 'taslak',
  `approved_by` bigint(20) unsigned DEFAULT NULL,
  `approved_at` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `purchase_requests_request_number_unique` (`request_number`),
  KEY `purchase_requests_requested_by_foreign` (`requested_by`),
  KEY `purchase_requests_project_id_foreign` (`project_id`),
  KEY `purchase_requests_department_id_foreign` (`department_id`),
  KEY `purchase_requests_approved_by_foreign` (`approved_by`),
  CONSTRAINT `purchase_requests_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `purchase_requests_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE SET NULL,
  CONSTRAINT `purchase_requests_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE SET NULL,
  CONSTRAINT `purchase_requests_requested_by_foreign` FOREIGN KEY (`requested_by`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `purchase_requests`
--

LOCK TABLES `purchase_requests` WRITE;
/*!40000 ALTER TABLE `purchase_requests` DISABLE KEYS */;
/*!40000 ALTER TABLE `purchase_requests` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `role_has_permissions`
--

DROP TABLE IF EXISTS `role_has_permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `role_has_permissions` (
  `permission_id` bigint(20) unsigned NOT NULL,
  `role_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`),
  KEY `role_has_permissions_role_id_foreign` (`role_id`),
  CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `role_has_permissions`
--

LOCK TABLES `role_has_permissions` WRITE;
/*!40000 ALTER TABLE `role_has_permissions` DISABLE KEYS */;
INSERT INTO `role_has_permissions` VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9),(1,10),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(10,2),(10,3),(10,5),(11,1),(12,1),(13,1),(14,1),(14,2),(14,3),(15,1),(16,1),(17,1),(18,1),(18,2),(18,3),(18,4),(19,1),(20,1),(20,4),(21,1),(22,1),(22,2),(22,3),(22,4),(23,1),(24,1),(24,4),(25,1),(26,1),(26,2),(26,6),(27,1),(27,2),(27,6),(28,1),(28,2),(28,6),(29,1),(29,6),(30,1),(30,2),(30,6),(31,1),(31,2),(32,1),(32,2),(33,1),(34,1),(34,2),(35,1),(35,2),(35,3),(35,5),(35,6),(35,7),(35,8),(36,1),(36,2),(37,1),(37,2),(37,3),(38,1),(39,1),(39,2),(39,3),(39,4),(39,5),(40,1),(40,4),(41,1),(41,4),(42,1),(42,4),(43,1),(43,4),(44,1),(44,4),(45,1),(45,4),(46,1),(46,4),(47,1),(48,1),(48,4),(48,6),(48,9),(49,1),(49,4),(49,6),(49,9),(50,1),(50,4),(50,6),(50,9),(51,1),(51,9),(52,1),(52,4),(52,6),(52,9),(53,1),(53,4),(53,6),(53,9),(54,1),(54,6),(55,1),(56,1),(56,6),(57,1),(57,2),(57,3),(57,6),(57,7),(57,8),(58,1),(59,1);
/*!40000 ALTER TABLE `role_has_permissions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `roles`
--

DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `roles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `roles`
--

LOCK TABLES `roles` WRITE;
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
INSERT INTO `roles` VALUES (1,'Admin','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(2,'Proje Yöneticisi','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(3,'Saha Şefi','web','2026-03-14 15:23:23','2026-03-14 15:23:23'),(4,'Bakım Şefi','web','2026-03-14 15:23:24','2026-03-14 15:23:24'),(5,'Saha Personeli','web','2026-03-14 15:23:24','2026-03-14 15:23:24'),(6,'İdari-Mali','web','2026-03-14 15:23:24','2026-03-14 15:23:24'),(7,'Laboratuvar','web','2026-03-14 15:23:24','2026-03-14 15:23:24'),(8,'Jeofizik','web','2026-03-14 15:23:24','2026-03-14 15:23:24'),(9,'Depo Sorumlusu','web','2026-03-14 15:23:24','2026-03-14 15:23:24'),(10,'Misafir','web','2026-03-14 15:23:24','2026-03-14 15:23:24');
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sessions`
--

DROP TABLE IF EXISTS `sessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sessions`
--

LOCK TABLES `sessions` WRITE;
/*!40000 ALTER TABLE `sessions` DISABLE KEYS */;
INSERT INTO `sessions` VALUES ('MwVnZCJtkb4RmZZcQ3lcxB59ZeUk1yZJHDA50vW9',1,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36','YTo1OntzOjY6Il90b2tlbiI7czo0MDoiUmNYZlNTWmNSV2ZWRjRWNUhVb3ZlYTNGbEFvVEVJVHllSkJBcEZncyI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDY6Imh0dHA6Ly9sb2NhbGhvc3QvcGFuZWxfa2Vza2EvcHVibGljL3Byb2plY3RzLzEiO3M6NToicm91dGUiO3M6MTM6InByb2plY3RzLnNob3ciO31zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToxO3M6MTU6InByb2plY3RfY29sdW1ucyI7YToxMDp7aTowO3M6MTM6InN1YmNvbnRyYWN0b3IiO2k6MTtzOjQ6ImNpdHkiO2k6MjtzOjg6ImRpc3RyaWN0IjtpOjM7czoxMjoibmVpZ2hib3Job29kIjtpOjQ7czozOiJhZGEiO2k6NTtzOjY6InBhcmNlbCI7aTo2O3M6ODoiam9iX3R5cGUiO2k6NztzOjEzOiJvZmZlcl9maWxlX25vIjtpOjg7czoxMToicmVzcG9uc2libGUiO2k6OTtzOjEzOiJwbGFubmVkX3N0YXJ0Ijt9fQ==',1773598451),('pecSDSN31jgc07UdEKqCDrFCy2MfrD1o4t8XxQ8y',NULL,'127.0.0.1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.1.6679 Chrome/144.0.7559.173 Electron/40.4.1 Safari/537.36 MSIX','YToyOntzOjY6Il90b2tlbiI7czo0MDoiYVVDZk9ZR085cVNMZG5UeEpZWUtRUTQycHU1cW9aR24yNTZnTkd3TyI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==',1773588891),('PGbkHsP9ANNtW6riJpHDp9GZu3WoTbfysfp4X9Lp',1,'127.0.0.1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.1.6679 Chrome/144.0.7559.173 Electron/40.4.1 Safari/537.36 MSIX','YTo0OntzOjY6Il90b2tlbiI7czo0MDoid2c1d2twUHdPaE9IbHcwbjVBeXRvRWtYeW1Eek5nek5KM1pUUmJiNiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzE6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9kYXNoYm9hcmQiO3M6NToicm91dGUiO3M6OToiZGFzaGJvYXJkIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTt9',1773595387),('QWHDOPE0FGECs7YHoKIGKzluDDypEBwImGIEFPWy',1,'127.0.0.1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.1.6679 Chrome/144.0.7559.173 Electron/40.4.1 Safari/537.36 MSIX','YTo0OntzOjY6Il90b2tlbiI7czo0MDoiRW12a3VvWERWelIzV0FUcXJtMWpVeFZiTUFQTVVPbGxaU1p3UkNKbSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzI6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9wcm9qZWN0cy8xIjtzOjU6InJvdXRlIjtzOjEzOiJwcm9qZWN0cy5zaG93Ijt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTt9',1773594586);
/*!40000 ALTER TABLE `sessions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `settings`
--

DROP TABLE IF EXISTS `settings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `settings` (
  `key` varchar(255) NOT NULL,
  `value` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `settings`
--

LOCK TABLES `settings` WRITE;
/*!40000 ALTER TABLE `settings` DISABLE KEYS */;
INSERT INTO `settings` VALUES ('project_number_padding','5','2026-03-15 08:42:57','2026-03-15 08:42:57'),('project_padding','5','2026-03-15 08:41:48','2026-03-15 08:41:48'),('project_prefix','KP','2026-03-15 08:41:48','2026-03-15 08:41:48');
/*!40000 ALTER TABLE `settings` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `team_members`
--

DROP TABLE IF EXISTS `team_members`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `team_members` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `team_id` bigint(20) unsigned NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  `role_in_team` varchar(255) DEFAULT NULL,
  `started_at` date DEFAULT NULL,
  `ended_at` date DEFAULT NULL,
  `is_current` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `team_members_team_id_is_current_index` (`team_id`,`is_current`),
  KEY `team_members_user_id_is_current_index` (`user_id`,`is_current`),
  CONSTRAINT `team_members_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE CASCADE,
  CONSTRAINT `team_members_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `team_members`
--

LOCK TABLES `team_members` WRITE;
/*!40000 ALTER TABLE `team_members` DISABLE KEYS */;
/*!40000 ALTER TABLE `team_members` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `teams`
--

DROP TABLE IF EXISTS `teams`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `teams` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `code` varchar(255) NOT NULL,
  `department_id` bigint(20) unsigned DEFAULT NULL,
  `leader_id` bigint(20) unsigned DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `teams_code_unique` (`code`),
  KEY `teams_department_id_foreign` (`department_id`),
  KEY `teams_leader_id_foreign` (`leader_id`),
  CONSTRAINT `teams_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE SET NULL,
  CONSTRAINT `teams_leader_id_foreign` FOREIGN KEY (`leader_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `teams`
--

LOCK TABLES `teams` WRITE;
/*!40000 ALTER TABLE `teams` DISABLE KEYS */;
INSERT INTO `teams` VALUES (1,'Keska 1','KESKA-1',1,NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(2,'Keska 2','KESKA-2',1,NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(3,'Keska 3','KESKA-3',1,NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(4,'Keska 4','KESKA-4',1,NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(5,'Keska 5','KESKA-5',1,NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(6,'Bakım Ekibi','BAKIM',5,NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(7,'Etüt Ekibi','ETUT',2,NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(8,'Jeofizik Ekibi','JEOFIZIK',3,NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(9,'İdari Ekip','IDARI',4,NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24'),(10,'Laboratuvar Ekibi','LAB',6,NULL,1,'2026-03-14 15:23:24','2026-03-14 15:23:24');
/*!40000 ALTER TABLE `teams` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `avatar` varchar(255) DEFAULT NULL,
  `department_id` bigint(20) unsigned DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `users`
--

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'Admin','admin@keska.com.tr','2026-03-14 15:23:24','$2y$12$7Ctjnk6Jo5eXUvWcwQArIemfhH0fZ9TGvzU7lMadG2dOgL4oBGsXG','0555 000 0000',NULL,NULL,1,'hDJgnY6JiVw20ho9PPa8bXFx1EYj6ZgVY90yPmYamr49IHLsSCLKnv0seP71','2026-03-14 15:23:24','2026-03-14 15:23:24'),(2,'Test User','test@example.com',NULL,'$2y$12$UISjl4fAQiKpteJGOswxeO1ZUSlYhI0OhYlOflHN1PwjxgGr3I3dm',NULL,NULL,NULL,1,NULL,'2026-03-14 17:51:46','2026-03-14 17:51:46');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `vehicle_documents`
--

DROP TABLE IF EXISTS `vehicle_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vehicle_documents` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `vehicle_id` bigint(20) unsigned NOT NULL,
  `type` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `file_path` varchar(255) NOT NULL,
  `expiry_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `vehicle_documents_vehicle_id_foreign` (`vehicle_id`),
  CONSTRAINT `vehicle_documents_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `vehicle_documents`
--

LOCK TABLES `vehicle_documents` WRITE;
/*!40000 ALTER TABLE `vehicle_documents` DISABLE KEYS */;
/*!40000 ALTER TABLE `vehicle_documents` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `vehicles`
--

DROP TABLE IF EXISTS `vehicles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vehicles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `plate_number` varchar(255) NOT NULL,
  `brand` varchar(255) DEFAULT NULL,
  `model` varchar(255) DEFAULT NULL,
  `year` year(4) DEFAULT NULL,
  `type` enum('kamyon','pickup','binek','diger') NOT NULL DEFAULT 'kamyon',
  `current_km` int(11) DEFAULT NULL,
  `fuel_type` varchar(20) DEFAULT NULL,
  `insurance_expiry` date DEFAULT NULL,
  `inspection_expiry` date DEFAULT NULL,
  `status` enum('aktif','bakimda','arizali','pasif') NOT NULL DEFAULT 'aktif',
  `team_id` bigint(20) unsigned DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `vehicles_plate_number_unique` (`plate_number`),
  KEY `vehicles_team_id_foreign` (`team_id`),
  CONSTRAINT `vehicles_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `vehicles`
--

LOCK TABLES `vehicles` WRITE;
/*!40000 ALTER TABLE `vehicles` DISABLE KEYS */;
INSERT INTO `vehicles` VALUES (1,'41 SU 031','Ford','Cargo',NULL,'kamyon',NULL,NULL,NULL,NULL,'aktif',NULL,NULL,'2026-03-14 16:49:25','2026-03-14 16:49:25'),(2,'35 AH 4582','IVECO',NULL,NULL,'kamyon',NULL,NULL,NULL,NULL,'aktif',NULL,NULL,'2026-03-14 18:32:40','2026-03-14 18:32:40');
/*!40000 ALTER TABLE `vehicles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `warehouses`
--

DROP TABLE IF EXISTS `warehouses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `warehouses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `location` varchar(255) DEFAULT NULL,
  `manager_id` bigint(20) unsigned DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `warehouses_manager_id_foreign` (`manager_id`),
  CONSTRAINT `warehouses_manager_id_foreign` FOREIGN KEY (`manager_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `warehouses`
--

LOCK TABLES `warehouses` WRITE;
/*!40000 ALTER TABLE `warehouses` DISABLE KEYS */;
/*!40000 ALTER TABLE `warehouses` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping routines for database 'keska_panel'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2026-03-16  9:59:05
