-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 17 May 2026, 14:30:17
-- Sunucu sürümü: 10.4.32-MariaDB
-- PHP Sürümü: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!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 */;

--
-- Veritabanı: `keska_panel`
--

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `activity_logs`
--

CREATE TABLE `activity_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_name` varchar(255) DEFAULT NULL,
  `action` varchar(20) NOT NULL,
  `model_type` varchar(80) NOT NULL,
  `model_id` bigint(20) UNSIGNED DEFAULT NULL,
  `model_label` varchar(255) DEFAULT NULL,
  `module` varchar(40) DEFAULT NULL,
  `url` varchar(500) DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `changes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`changes`)),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `activity_logs`
--

INSERT INTO `activity_logs` (`id`, `user_id`, `user_name`, `action`, `model_type`, `model_id`, `model_label`, `module`, `url`, `ip_address`, `changes`, `created_at`) VALUES
(1, NULL, 'Sistem', 'created', 'User', 1, 'Admin', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"email\",\"old_value\":null,\"new_value\":\"admin@keska.com.tr\"},{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Admin\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"admin\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"0555 000 0000\"},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":1}]', '2026-05-16 17:17:13'),
(2, 1, 'Admin', 'created', 'Contact', 1, '1', 'teklifler', 'http://localhost/panel_keska/public/api/contacts/quick-store', '::1', '[{\"field\":\"company_name\",\"old_value\":null,\"new_value\":\"Ahmet\"},{\"field\":\"contact_subtype\",\"old_value\":null,\"new_value\":\"bireysel\"},{\"field\":\"roles\",\"old_value\":null,\"new_value\":\"[\\\"musteri\\\"]\"},{\"field\":\"musteri_number\",\"old_value\":null,\"new_value\":\"MST_0001\"},{\"field\":\"id\",\"old_value\":null,\"new_value\":1}]', '2026-05-17 08:09:40'),
(3, 1, 'Admin', 'created', 'Proposal', 1, 'test', 'teklifler', 'http://localhost/panel_keska/public/proposals', '::1', '[{\"field\":\"proposal_number\",\"old_value\":null,\"new_value\":\"TKL_260001\"},{\"field\":\"title\",\"old_value\":null,\"new_value\":\"test\"},{\"field\":\"requested_at\",\"old_value\":null,\"new_value\":\"2026-05-17 00:00:00\"},{\"field\":\"contact_id\",\"old_value\":null,\"new_value\":\"1\"},{\"field\":\"validity_days\",\"old_value\":null,\"new_value\":\"15\"},{\"field\":\"currency\",\"old_value\":null,\"new_value\":\"TRY\"},{\"field\":\"city\",\"old_value\":null,\"new_value\":\"Kocaeli\"},{\"field\":\"district\",\"old_value\":null,\"new_value\":\"G\\u00f6lc\\u00fck\"},{\"field\":\"neighborhood\",\"old_value\":null,\"new_value\":\"\\u015e.De\\u011firmendere K\\u00f6y\\u00fc\"},{\"field\":\"pafta\",\"old_value\":null,\"new_value\":\"20J3\"},{\"field\":\"ada\",\"old_value\":null,\"new_value\":\"199\"},{\"field\":\"parcel\",\"old_value\":null,\"new_value\":\"3\"},{\"field\":\"area_m2\",\"old_value\":null,\"new_value\":\"404.00\"},{\"field\":\"latitude\",\"old_value\":null,\"new_value\":\"40.7181140\"},{\"field\":\"longitude\",\"old_value\":null,\"new_value\":\"29.7857200\"},{\"field\":\"job_type\",\"old_value\":null,\"new_value\":\"proje\"},{\"field\":\"urgency\",\"old_value\":null,\"new_value\":\"Normal\"},{\"field\":\"is_public_work\",\"old_value\":null,\"new_value\":false},{\"field\":\"prepared_by_name\",\"old_value\":null,\"new_value\":\"\\u015eahin KESK\\u0130N\"},{\"field\":\"prepared_by\",\"old_value\":null,\"new_value\":1},{\"field\":\"status\",\"old_value\":null,\"new_value\":\"hazirlaniyor\"},{\"field\":\"id\",\"old_value\":null,\"new_value\":1}]', '2026-05-17 08:10:04'),
(4, 1, 'Admin', 'updated', 'Proposal', 1, 'test', 'teklifler', 'http://localhost/panel_keska/public/proposals/1/items', '::1', '[{\"field\":\"total_amount\",\"old_value\":null,\"new_value\":45000}]', '2026-05-17 08:12:21'),
(5, 1, 'Admin', 'updated', 'Proposal', 1, 'test', 'teklifler', 'http://localhost/panel_keska/public/proposals/1/items', '::1', '[{\"field\":\"total_amount\",\"old_value\":\"45000.00\",\"new_value\":55000}]', '2026-05-17 08:12:31'),
(6, 1, 'Admin', 'created', 'Project', 1, 'test', 'teklifler', 'http://localhost/panel_keska/public/proposals/1/status', '::1', '[{\"field\":\"project_number\",\"old_value\":null,\"new_value\":\"PRJ_260001\"},{\"field\":\"proposal_id\",\"old_value\":null,\"new_value\":1},{\"field\":\"contact_id\",\"old_value\":null,\"new_value\":1},{\"field\":\"title\",\"old_value\":null,\"new_value\":\"test\"},{\"field\":\"manager_id\",\"old_value\":null,\"new_value\":1},{\"field\":\"status\",\"old_value\":null,\"new_value\":\"evrak_asamasi\"},{\"field\":\"planned_work_count\",\"old_value\":null,\"new_value\":2},{\"field\":\"city\",\"old_value\":null,\"new_value\":\"Kocaeli\"},{\"field\":\"district\",\"old_value\":null,\"new_value\":\"G\\u00f6lc\\u00fck\"},{\"field\":\"neighborhood\",\"old_value\":null,\"new_value\":\"\\u015e.De\\u011firmendere K\\u00f6y\\u00fc\"},{\"field\":\"pafta\",\"old_value\":null,\"new_value\":\"20J3\"},{\"field\":\"ada\",\"old_value\":null,\"new_value\":\"199\"},{\"field\":\"parcel\",\"old_value\":null,\"new_value\":\"3\"},{\"field\":\"area_m2\",\"old_value\":null,\"new_value\":\"404.00\"},{\"field\":\"job_type\",\"old_value\":null,\"new_value\":\"proje\"},{\"field\":\"urgency\",\"old_value\":null,\"new_value\":\"Normal\"},{\"field\":\"planned_start\",\"old_value\":null,\"new_value\":\"2026-05-17 00:00:00\"},{\"field\":\"id\",\"old_value\":null,\"new_value\":1}]', '2026-05-17 08:12:42'),
(7, NULL, 'Sistem', 'created', 'User', 2, 'Fahrettin BELCİ', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Fahrettin BELC\\u0130\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"fahrettinbelci\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05375556110\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":1},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":2}]', '2026-05-17 08:22:50'),
(8, NULL, 'Sistem', 'created', 'User', 3, 'Ebru Ekşi ONAT', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Ebru Ek\\u015fi ONAT\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"ebrueksionat\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05316954091\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":1},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":3}]', '2026-05-17 08:22:50'),
(9, NULL, 'Sistem', 'created', 'User', 4, 'Begüm GÜNEŞ', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Beg\\u00fcm G\\u00dcNE\\u015e\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"begumgunes\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05419361306\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":1},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":4}]', '2026-05-17 08:22:50'),
(10, NULL, 'Sistem', 'created', 'User', 5, 'Tamer ONAT', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Tamer ONAT\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"tameronat\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05382461242\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":1},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":5}]', '2026-05-17 08:22:51'),
(11, NULL, 'Sistem', 'created', 'User', 6, 'Ali Özenç ŞAHİN', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Ali \\u00d6zen\\u00e7 \\u015eAH\\u0130N\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"aliozencsahin\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05340797083\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":1},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":6}]', '2026-05-17 08:22:51'),
(12, NULL, 'Sistem', 'created', 'User', 7, 'Metin AYYILDIZ', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Metin AYYILDIZ\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"metinayyildiz\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05317786921\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":2},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":7}]', '2026-05-17 08:22:51'),
(13, NULL, 'Sistem', 'created', 'User', 8, 'Melih GÖKÇE', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Melih G\\u00d6K\\u00c7E\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"melihgokce\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05349286657\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":2},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":8}]', '2026-05-17 08:22:51'),
(14, NULL, 'Sistem', 'created', 'User', 9, 'Emrah MURAT', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Emrah MURAT\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"emrahmurat\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05422180297\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":2},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":9}]', '2026-05-17 08:22:52'),
(15, NULL, 'Sistem', 'created', 'User', 10, 'Hakan DANACI', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Hakan DANACI\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"hakandanaci\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05314395646\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":3},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":10}]', '2026-05-17 08:22:52'),
(16, NULL, 'Sistem', 'created', 'User', 11, 'Ömer KIYAĞAN', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"\\u00d6mer KIYA\\u011eAN\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"omerkiyagan\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05326961156\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":3},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":11}]', '2026-05-17 08:22:52'),
(17, NULL, 'Sistem', 'created', 'User', 12, 'Elif MUT', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Elif MUT\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"elifmut\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05466140641\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":3},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":12}]', '2026-05-17 08:22:52'),
(18, NULL, 'Sistem', 'created', 'User', 13, 'Mustafa ÖZCAN', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Mustafa \\u00d6ZCAN\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"mustafaozcan\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05302286576\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":4},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":13}]', '2026-05-17 08:22:53'),
(19, NULL, 'Sistem', 'created', 'User', 14, 'Gökhan TORAMAN', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"G\\u00f6khan TORAMAN\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"gokhantoraman\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05459183716\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":4},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":14}]', '2026-05-17 08:22:53'),
(20, NULL, 'Sistem', 'created', 'User', 15, 'Kenan YILDIZ', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Kenan YILDIZ\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"kenanyildiz\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05306524371\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":5},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":15}]', '2026-05-17 08:22:53'),
(21, NULL, 'Sistem', 'created', 'User', 16, 'Hüseyin BAYRAM', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"H\\u00fcseyin BAYRAM\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"huseyinbayram\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05444212500\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":16}]', '2026-05-17 08:22:53'),
(22, NULL, 'Sistem', 'created', 'User', 17, 'Yılmaz ÇETİN', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Y\\u0131lmaz \\u00c7ET\\u0130N\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"yilmazcetin\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05302646509\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":17}]', '2026-05-17 08:22:54'),
(23, NULL, 'Sistem', 'created', 'User', 18, 'Demirkan Fırat DEMİRKAYA', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Demirkan F\\u0131rat DEM\\u0130RKAYA\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"demirkanfiratdemirkaya\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05427916895\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":18}]', '2026-05-17 08:22:54'),
(24, NULL, 'Sistem', 'created', 'User', 19, 'Tuğberk DOĞANÇAY', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Tu\\u011fberk DO\\u011eAN\\u00c7AY\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"tugberkdogancay\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05517117529\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":19}]', '2026-05-17 08:22:54'),
(25, NULL, 'Sistem', 'created', 'User', 20, 'Özgür Sezer FERMAN', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"\\u00d6zg\\u00fcr Sezer FERMAN\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"ozgursezerferman\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05318497054\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":20}]', '2026-05-17 08:22:54'),
(26, NULL, 'Sistem', 'created', 'User', 21, 'Sezgin FERMAN', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Sezgin FERMAN\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"sezginferman\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05365036591\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":21}]', '2026-05-17 08:22:54'),
(27, NULL, 'Sistem', 'created', 'User', 22, 'Vedat KADAK', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Vedat KADAK\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"vedatkadak\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05379288274\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":22}]', '2026-05-17 08:22:55'),
(28, NULL, 'Sistem', 'created', 'User', 23, 'Botir MAKHMANAZAROV', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Botir MAKHMANAZAROV\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"botirmakhmanazarov\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"+998507554574\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":23}]', '2026-05-17 08:22:55'),
(29, NULL, 'Sistem', 'created', 'User', 24, 'Ergün MÜLAYİM', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Erg\\u00fcn M\\u00dcLAY\\u0130M\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"ergunmulayim\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05439541822\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":24}]', '2026-05-17 08:22:55'),
(30, NULL, 'Sistem', 'created', 'User', 25, 'Erkan ÖZGÜR', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Erkan \\u00d6ZG\\u00dcR\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"erkanozgur\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05365560379\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":25}]', '2026-05-17 08:22:55'),
(31, NULL, 'Sistem', 'created', 'User', 26, 'Melih TAŞDEMİR', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Melih TA\\u015eDEM\\u0130R\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"melihtasdemir\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05544424171\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":26}]', '2026-05-17 08:22:56'),
(32, NULL, 'Sistem', 'created', 'User', 27, 'Muharrem TORAMAN', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Muharrem TORAMAN\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"muharremtoraman\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05323819930\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":27}]', '2026-05-17 08:22:56'),
(33, NULL, 'Sistem', 'created', 'User', 28, 'Veli UÇMAN', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Veli U\\u00c7MAN\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"veliucman\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05322713110\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":28}]', '2026-05-17 08:22:56'),
(34, NULL, 'Sistem', 'created', 'User', 29, 'Necati YALIN', 'admin', 'http://localhost/panel_keska/public', '127.0.0.1', '[{\"field\":\"name\",\"old_value\":null,\"new_value\":\"Necati YALIN\"},{\"field\":\"username\",\"old_value\":null,\"new_value\":\"necatiyalin\"},{\"field\":\"phone\",\"old_value\":null,\"new_value\":\"05468949421\"},{\"field\":\"department_id\",\"old_value\":null,\"new_value\":6},{\"field\":\"is_active\",\"old_value\":null,\"new_value\":true},{\"field\":\"id\",\"old_value\":null,\"new_value\":29}]', '2026-05-17 08:22:56');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `bordro_donemi`
--

CREATE TABLE `bordro_donemi` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ay` tinyint(4) NOT NULL,
  `yil` smallint(6) NOT NULL,
  `aciklama` varchar(255) DEFAULT NULL,
  `durum` enum('taslak','kesinlesti') NOT NULL DEFAULT 'taslak',
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `bordro_kalemleri`
--

CREATE TABLE `bordro_kalemleri` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bordro_donemi_id` bigint(20) UNSIGNED NOT NULL,
  `employee_id` bigint(20) UNSIGNED NOT NULL,
  `brut_maas` decimal(12,2) NOT NULL DEFAULT 0.00,
  `prim` decimal(12,2) NOT NULL DEFAULT 0.00,
  `fazla_mesai` decimal(12,2) NOT NULL DEFAULT 0.00,
  `ssk_isci` decimal(12,2) NOT NULL DEFAULT 0.00,
  `ssk_isveren` decimal(12,2) NOT NULL DEFAULT 0.00,
  `gelir_vergisi` decimal(12,2) NOT NULL DEFAULT 0.00,
  `damga_vergisi` decimal(12,2) NOT NULL DEFAULT 0.00,
  `diger_kesintiler` decimal(12,2) NOT NULL DEFAULT 0.00,
  `net_maas` decimal(12,2) NOT NULL DEFAULT 0.00,
  `odeme_tarihi` date DEFAULT NULL,
  `odendi` tinyint(1) NOT NULL DEFAULT 0,
  `notlar` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `cache`
--

INSERT INTO `cache` (`key`, `value`, `expiration`) VALUES
('keska-360-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:64:{i:0;a:4:{s:1:\"a\";i:3;s:1:\"b\";s:9:\"teklifler\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:1;a:4:{s:1:\"a\";i:4;s:1:\"b\";s:17:\"teklifler.olustur\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:2;a:4:{s:1:\"a\";i:5;s:1:\"b\";s:17:\"teklifler.duzenle\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:3;a:4:{s:1:\"a\";i:6;s:1:\"b\";s:13:\"teklifler.sil\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:4;a:4:{s:1:\"a\";i:7;s:1:\"b\";s:16:\"teklifler.revize\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:5;a:4:{s:1:\"a\";i:8;s:1:\"b\";s:15:\"teklifler.durum\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:6;a:4:{s:1:\"a\";i:9;s:1:\"b\";s:18:\"teklifler.donustur\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:7;a:4:{s:1:\"a\";i:10;s:1:\"b\";s:17:\"teklifler.taseron\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:8;a:4:{s:1:\"a\";i:11;s:1:\"b\";s:25:\"teklifler.taseron.olustur\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:9;a:4:{s:1:\"a\";i:12;s:1:\"b\";s:25:\"teklifler.taseron.duzenle\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:10;a:4:{s:1:\"a\";i:13;s:1:\"b\";s:21:\"teklifler.taseron.sil\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:11;a:4:{s:1:\"a\";i:14;s:1:\"b\";s:23:\"teklifler.taseron.durum\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:12;a:4:{s:1:\"a\";i:15;s:1:\"b\";s:19:\"teklifler.sablonlar\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:13;a:4:{s:1:\"a\";i:16;s:1:\"b\";s:10:\"etut_proje\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:14;a:4:{s:1:\"a\";i:17;s:1:\"b\";s:18:\"etut_proje.olustur\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:15;a:4:{s:1:\"a\";i:18;s:1:\"b\";s:18:\"etut_proje.duzenle\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:16;a:4:{s:1:\"a\";i:19;s:1:\"b\";s:14:\"etut_proje.sil\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:17;a:4:{s:1:\"a\";i:20;s:1:\"b\";s:16:\"etut_proje.durum\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:18;a:4:{s:1:\"a\";i:21;s:1:\"b\";s:17:\"etut_proje.kapsam\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:19;a:4:{s:1:\"a\";i:22;s:1:\"b\";s:15:\"etut_proje.saha\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:20;a:4:{s:1:\"a\";i:23;s:1:\"b\";s:14:\"etut_proje.lab\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:21;a:4:{s:1:\"a\";i:24;s:1:\"b\";s:14:\"etut_proje.kml\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:22;a:4:{s:1:\"a\";i:25;s:1:\"b\";s:19:\"etut_proje.log_onay\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:23;a:4:{s:1:\"a\";i:26;s:1:\"b\";s:12:\"bakim_onarim\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:24;a:4:{s:1:\"a\";i:27;s:1:\"b\";s:8:\"envanter\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:25;a:4:{s:1:\"a\";i:28;s:1:\"b\";s:8:\"muhasebe\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:26;a:4:{s:1:\"a\";i:29;s:1:\"b\";s:2:\"ik\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:27;a:4:{s:1:\"a\";i:30;s:1:\"b\";s:6:\"harita\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:28;a:4:{s:1:\"a\";i:31;s:1:\"b\";s:18:\"harita.kategoriler\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:29;a:4:{s:1:\"a\";i:32;s:1:\"b\";s:15:\"harita.poi.ekle\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:30;a:4:{s:1:\"a\";i:33;s:1:\"b\";s:18:\"harita.poi.duzenle\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:31;a:4:{s:1:\"a\";i:34;s:1:\"b\";s:14:\"harita.poi.sil\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:32;a:4:{s:1:\"a\";i:35;s:1:\"b\";s:6:\"sondaj\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:33;a:4:{s:1:\"a\";i:36;s:1:\"b\";s:8:\"jeofizik\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:34;a:4:{s:1:\"a\";i:37;s:1:\"b\";s:4:\"saha\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:35;a:4:{s:1:\"a\";i:38;s:1:\"b\";s:11:\"saha.sondaj\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:36;a:4:{s:1:\"a\";i:39;s:1:\"b\";s:15:\"saha.sondaj.gir\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:37;a:4:{s:1:\"a\";i:40;s:1:\"b\";s:19:\"saha.sondaj.duzenle\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:38;a:4:{s:1:\"a\";i:41;s:1:\"b\";s:15:\"saha.sondaj.sil\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:39;a:4:{s:1:\"a\";i:42;s:1:\"b\";s:13:\"saha.jeofizik\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:40;a:4:{s:1:\"a\";i:43;s:1:\"b\";s:17:\"saha.jeofizik.gir\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:41;a:4:{s:1:\"a\";i:44;s:1:\"b\";s:21:\"saha.jeofizik.duzenle\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:42;a:4:{s:1:\"a\";i:45;s:1:\"b\";s:17:\"saha.jeofizik.sil\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:43;a:4:{s:1:\"a\";i:46;s:1:\"b\";s:8:\"saha.log\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:44;a:4:{s:1:\"a\";i:47;s:1:\"b\";s:16:\"saha.log.olustur\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:45;a:4:{s:1:\"a\";i:48;s:1:\"b\";s:16:\"saha.log.duzenle\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:46;a:4:{s:1:\"a\";i:49;s:1:\"b\";s:12:\"saha.log.sil\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:47;a:4:{s:1:\"a\";i:50;s:1:\"b\";s:15:\"saha.log.gonder\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:48;a:4:{s:1:\"a\";i:51;s:1:\"b\";s:13:\"istatistikler\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:49;a:4:{s:1:\"a\";i:52;s:1:\"b\";s:14:\"yonetim_paneli\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:50;a:4:{s:1:\"a\";i:53;s:1:\"b\";s:6:\"rehber\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:51;a:4:{s:1:\"a\";i:54;s:1:\"b\";s:14:\"rehber.olustur\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:52;a:4:{s:1:\"a\";i:55;s:1:\"b\";s:14:\"rehber.duzenle\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:53;a:4:{s:1:\"a\";i:56;s:1:\"b\";s:10:\"rehber.sil\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:54;a:4:{s:1:\"a\";i:57;s:1:\"b\";s:15:\"rehber.projeler\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:55;a:4:{s:1:\"a\";i:58;s:1:\"b\";s:16:\"rehber.teklifler\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:56;a:4:{s:1:\"a\";i:59;s:1:\"b\";s:17:\"rehber.siparisler\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:57;a:4:{s:1:\"a\";i:60;s:1:\"b\";s:17:\"rehber.hakedisler\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:58;a:4:{s:1:\"a\";i:61;s:1:\"b\";s:16:\"rehber.faturalar\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:59;a:4:{s:1:\"a\";i:62;s:1:\"b\";s:11:\"rehber.cari\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:60;a:4:{s:1:\"a\";i:63;s:1:\"b\";s:13:\"rehber.notlar\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:61;a:4:{s:1:\"a\";i:64;s:1:\"b\";s:17:\"bildirimler.yonet\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:62;a:4:{s:1:\"a\";i:65;s:1:\"b\";s:14:\"bildirimler.al\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}i:63;a:4:{s:1:\"a\";i:66;s:1:\"b\";s:16:\"etut_proje.diger\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:1:{i:0;i:1;}}}s:5:\"roles\";a:1:{i:0;a:3:{s:1:\"a\";i:1;s:1:\"b\";s:5:\"Admin\";s:1:\"c\";s:3:\"web\";}}}', 1779107406),
('keska-360-cache-tkgm:mahalleler:63:GOLCUK', 'a:54:{i:0;s:17:\"A.Ulaşlı Köyü\";i:1;s:20:\"Ayvazpınarı Köyü\";i:2;s:10:\"Cumhuriyet\";i:3;s:10:\"Denizevler\";i:4;s:20:\"Değirmendere Köyü\";i:5;s:20:\"Değirmendere/Merkez\";i:6;s:19:\"Değirmendere/Yalı\";i:7;s:7:\"Donanma\";i:8;s:11:\"Dumlupınar\";i:9;s:10:\"Düzağaç\";i:10;s:14:\"Eski Ferhadiye\";i:11;s:16:\"Halıdere Köyü\";i:12;s:15:\"Halıdere Yalı\";i:13;s:14:\"Halıdere Yeni\";i:14;s:15:\"Hamidiye Köyü\";i:15;s:16:\"Hasaneyin Köyü\";i:16;s:16:\"Hisareyin Köyü\";i:17;s:16:\"Hisareyin Merkez\";i:18;s:11:\"Karaköprü\";i:19;s:8:\"Kavaklı\";i:20;s:7:\"Körfez\";i:21;s:15:\"Lütfiye Köyü\";i:22;s:15:\"Mamuriye Köyü\";i:23;s:6:\"Merkez\";i:24;s:16:\"Mesruriye Köyü\";i:25;s:15:\"Nimetiye Köyü\";i:26;s:17:\"Nüzhetiye Köyü\";i:27;s:8:\"Panayır\";i:28;s:11:\"Piyalepaşa\";i:29;s:15:\"Saraylı Köyü\";i:30;s:15:\"Selimiye Köyü\";i:31;s:15:\"Siretiye Köyü\";i:32;s:14:\"Sofular Köyü\";i:33;s:14:\"Ulaşlı Yalı\";i:34;s:27:\"Ulaşlı Yavuz Sultan Selim\";i:35;s:14:\"Yazlık Köyü\";i:36;s:14:\"Yeni Ferhadiye\";i:37;s:11:\"Yenimahalle\";i:38;s:15:\"Yukarı Mahalle\";i:39;s:10:\"Yunus Emre\";i:40;s:13:\"Yüzbaşılar\";i:41;s:8:\"Çiftlik\";i:42;s:14:\"Örcün Köyü\";i:43;s:18:\"Örcün Ş. Köyü\";i:44;s:14:\"Ümmiye Köyü\";i:45;s:15:\"İcadiye Köyü\";i:46;s:16:\"İhsaniye Köyü\";i:47;s:10:\"İpek Yolu\";i:48;s:17:\"İrşadiye Köyü\";i:49;s:23:\"Ş.Değirmendere Köyü\";i:50;s:17:\"Ş.Yazlık Köyü\";i:51;s:9:\"Şehitler\";i:52;s:17:\"Şevketiye Köyü\";i:53;s:10:\"Şirinköy\";}', 1779091792),
('keska-360-cache-tkgm:mahalleler:63:IZMIT', 'a:104:{i:0;s:7:\"Akmeşe\";i:1;s:16:\"Akmeşe Atatürk\";i:2;s:18:\"Akmeşe Cumhuriyet\";i:3;s:8:\"Akpınar\";i:4;s:9:\"Akçakoca\";i:5;s:17:\"Alikahya Atatürk\";i:6;s:19:\"Alikahya Cumhuriyet\";i:7;s:14:\"Alikahya Fatih\";i:8;s:15:\"Alikahya Merkez\";i:9;s:8:\"Ambarcı\";i:10;s:16:\"Arpalıkihsaniye\";i:11;s:8:\"Arızlı\";i:12;s:8:\"Balören\";i:13;s:9:\"Bayraktar\";i:14;s:9:\"Bağlıca\";i:15;s:10:\"Biberoğlu\";i:16;s:6:\"Bulduk\";i:17;s:11:\"Böğürgen\";i:18;s:5:\"Cedit\";i:19;s:10:\"Cumhuriyet\";i:20;s:8:\"Dağköy\";i:21;s:8:\"Deretepe\";i:22;s:8:\"Durhasan\";i:23;s:12:\"Düğmeciler\";i:24;s:7:\"Emirhan\";i:25;s:6:\"Eseler\";i:26;s:7:\"Fethiye\";i:27;s:12:\"Fevziçakmak\";i:28;s:7:\"Gedikli\";i:29;s:12:\"Gökçeviran\";i:30;s:18:\"Gülbahçe Kadriye\";i:31;s:10:\"Gündoğdu\";i:32;s:12:\"Güvercinlik\";i:33;s:13:\"Hacı Hızır\";i:34;s:10:\"Hacıhasan\";i:35;s:8:\"Hakaniye\";i:36;s:12:\"Hasancıklar\";i:37;s:9:\"Hatipköy\";i:38;s:9:\"Kabaoğlu\";i:39;s:9:\"Kadıköy\";i:40;s:13:\"Karaabdulbaki\";i:41;s:8:\"Karabaş\";i:42;s:14:\"Karadenizliler\";i:43;s:8:\"Kaynarca\";i:44;s:10:\"Kemalpaşa\";i:45;s:7:\"Kozluca\";i:46;s:6:\"Kozluk\";i:47;s:9:\"Kulfallı\";i:48;s:6:\"Kullar\";i:49;s:9:\"Kulmahmut\";i:50;s:8:\"Kurtdere\";i:51;s:17:\"Kuruçeşme Fatih\";i:52;s:7:\"Körfez\";i:53;s:8:\"Kısalar\";i:54;s:5:\"Malta\";i:55;s:8:\"Mecidiye\";i:56;s:14:\"Mehmetalipaşa\";i:57;s:8:\"Nebihoca\";i:58;s:5:\"Orhan\";i:59;s:8:\"Orhaniye\";i:60;s:9:\"Ortaburun\";i:61;s:6:\"Sanayi\";i:62;s:11:\"Sapakpınar\";i:63;s:10:\"Sarışeyh\";i:64;s:9:\"Sekbanlı\";i:65;s:8:\"Sepetçi\";i:66;s:6:\"Serdar\";i:67;s:9:\"Sultaniye\";i:68;s:12:\"Süleymaniye\";i:69;s:9:\"Süverler\";i:70;s:7:\"Tepecik\";i:71;s:8:\"Tepeköy\";i:72;s:14:\"Terzi Bayırı\";i:73;s:6:\"Turgut\";i:74;s:11:\"Tüysüzler\";i:75;s:12:\"Uzunbeykumla\";i:76;s:9:\"Veliahmet\";i:77;s:11:\"Yahyakaptan\";i:78;s:10:\"Yassıbağ\";i:79;s:6:\"Yenice\";i:80;s:10:\"Yenidoğan\";i:81;s:11:\"Yenimahalle\";i:82;s:10:\"Yenişehir\";i:83;s:9:\"Yeşilova\";i:84;s:8:\"Zabıtan\";i:85;s:11:\"Zeytinburnu\";i:86;s:12:\"Çavuşoğlu\";i:87;s:11:\"Çayırköy\";i:88;s:11:\"Çağırgan\";i:89;s:13:\"Çubuklu Bala\";i:90;s:17:\"Çubuklu Osmaniye\";i:91;s:10:\"Çukurbağ\";i:92;s:9:\"Ömerağa\";i:93;s:12:\"Ş. Durhasan\";i:94;s:11:\"Ş.Arızlı\";i:95;s:11:\"Ş.Deretepe\";i:96;s:13:\"Ş.Gündoğdu\";i:97;s:8:\"Ş.Hatip\";i:98;s:12:\"Ş.Kadıköy\";i:99;s:11:\"Ş.Karabaş\";i:100;s:10:\"Ş.Körfez\";i:101;s:14:\"Ş.Çayırköy\";i:102;s:9:\"Şahinler\";i:103;s:10:\"Şirintepe\";}', 1779091788),
('keska-360-cache-tkgm:parsel:181625:199:3', 'a:3:{s:4:\"type\";s:7:\"Feature\";s:8:\"geometry\";a:2:{s:4:\"type\";s:7:\"Polygon\";s:11:\"coordinates\";a:1:{i:0;a:5:{i:0;a:2:{i:0;d:29.78563;i:1;d:40.71819;}i:1;a:2:{i:0;d:29.78566;i:1;d:40.71797;}i:2;a:2:{i:0;d:29.78586;i:1;d:40.718;}i:3;a:2:{i:0;d:29.78582;i:1;d:40.71822;}i:4;a:2:{i:0;d:29.78563;i:1;d:40.71819;}}}}s:10:\"properties\";a:17:{s:6:\"ilceAd\";s:8:\"Gölcük\";s:6:\"mevkii\";s:0:\"\";s:4:\"ilId\";i:63;s:5:\"durum\";s:1:\"1\";s:6:\"ilceId\";i:625;s:12:\"zeminKmdurum\";s:14:\"Ana Taşınmaz\";s:8:\"parselNo\";s:1:\"3\";s:9:\"mahalleAd\";s:16:\"Ş.Değirmendere\";s:4:\"ozet\";s:22:\"Ş.Değirmendere-199/3\";s:18:\"gittigiParselListe\";s:0:\"\";s:18:\"gittigiParselSebep\";s:0:\"\";s:4:\"alan\";s:6:\"404,00\";s:5:\"adaNo\";s:3:\"199\";s:7:\"nitelik\";s:4:\"Arsa\";s:4:\"ilAd\";s:7:\"Kocaeli\";s:9:\"mahalleId\";i:181625;s:5:\"pafta\";s:4:\"20J3\";}}', 1781597399);

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `cari_entries`
--

CREATE TABLE `cari_entries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `contact_id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED DEFAULT NULL,
  `hakedis_id` bigint(20) UNSIGNED DEFAULT NULL,
  `fatura_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,
  `payment_method` varchar(255) DEFAULT NULL,
  `payment_bank` varchar(255) DEFAULT NULL,
  `check_serial` varchar(255) DEFAULT NULL,
  `check_due_date` date DEFAULT NULL,
  `card_last4` varchar(4) DEFAULT 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `chat_messages`
--

CREATE TABLE `chat_messages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `chat_room_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `mesaj` text NOT NULL,
  `tur` enum('mesaj','sistem','dosya') NOT NULL DEFAULT 'mesaj',
  `reply_to_id` bigint(20) UNSIGNED DEFAULT NULL,
  `duzenlendi` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `chat_rooms`
--

CREATE TABLE `chat_rooms` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ad` varchar(100) NOT NULL,
  `tur` enum('genel','ozel','grup','modul') NOT NULL DEFAULT 'genel',
  `modul` varchar(30) DEFAULT NULL,
  `aciklama` text DEFAULT NULL,
  `ikon` varchar(50) DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `chat_room_members`
--

CREATE TABLE `chat_room_members` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `chat_room_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `last_read_at` timestamp NULL DEFAULT NULL,
  `is_admin` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `contacts`
--

CREATE TABLE `contacts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `contact_number` varchar(30) DEFAULT NULL,
  `musteri_number` varchar(30) DEFAULT NULL,
  `tedarikci_number` varchar(30) DEFAULT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `contacts`
--

INSERT INTO `contacts` (`id`, `contact_number`, `musteri_number`, `tedarikci_number`, `contact_subtype`, `roles`, `company_name`, `title`, `contact_person`, `tax_office`, `tax_number`, `phone`, `secondary_phone`, `email`, `address`, `city`, `district`, `sector`, `notes`, `is_active`, `created_at`, `updated_at`) VALUES
(1, NULL, 'MST_0001', NULL, 'bireysel', '[\"musteri\"]', 'Ahmet', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-17 08:09:40', '2026-05-17 08:09:40');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `contact_addresses`
--

CREATE TABLE `contact_addresses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `contact_notes`
--

CREATE TABLE `contact_notes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `contact_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `content` text NOT NULL,
  `reminder_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `departments`
--

CREATE TABLE `departments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `departments`
--

INSERT INTO `departments` (`id`, `name`, `slug`, `description`, `manager_id`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Etüt ve Proje', 'etut-ve-proje', 'Etüt çalışmaları ve proje yönetimi', NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(2, 'Jeofizik', 'jeofizik', 'Jeofizik araştırma ve ölçüm', NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(3, 'İdari Mali İşler', 'idari-mali-isler', 'İdari ve mali işler', NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(4, 'Bakım Onarım Depo', 'bakim-onarim-depo', 'Araç, makine bakım onarım ve depo', NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(5, 'Laboratuvar', 'laboratuvar', 'Laboratuvar testleri ve analizleri', NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(6, 'Saha', 'saha', 'Saha sondaj ve imalat operasyonları', NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `device_locations`
--

CREATE TABLE `device_locations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `device_id` bigint(20) UNSIGNED NOT NULL,
  `lat` decimal(10,7) NOT NULL,
  `lng` decimal(10,7) NOT NULL,
  `accuracy` decimal(8,2) DEFAULT NULL,
  `speed` decimal(6,2) DEFAULT NULL,
  `battery` tinyint(3) UNSIGNED DEFAULT NULL,
  `recorded_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `received_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `employees`
--

CREATE TABLE `employees` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `personnel_id` bigint(20) UNSIGNED DEFAULT NULL,
  `personel_kodu` varchar(30) NOT NULL,
  `ad` varchar(100) NOT NULL,
  `soyad` varchar(100) NOT NULL,
  `tc_kimlik` varchar(11) DEFAULT NULL,
  `dogum_tarihi` date DEFAULT NULL,
  `cinsiyet` enum('erkek','kadin','belirtilmemis') NOT NULL DEFAULT 'belirtilmemis',
  `medeni_durum` enum('bekar','evli','bosanmis','dul') DEFAULT NULL,
  `telefon` varchar(20) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `adres` text DEFAULT NULL,
  `acil_kisi` varchar(150) DEFAULT NULL,
  `acil_telefon` varchar(20) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `gorev` varchar(150) DEFAULT NULL,
  `ise_baslama_tarihi` date DEFAULT NULL,
  `is_bitis_tarihi` date DEFAULT NULL,
  `calisma_turu` enum('tam_zamanli','yari_zamanli','uzaktan','mevsimlik') NOT NULL DEFAULT 'tam_zamanli',
  `sozlesme_turu` enum('belirsiz_sureli','belirli_sureli','stajyer') NOT NULL DEFAULT 'belirsiz_sureli',
  `maas` decimal(12,2) DEFAULT NULL,
  `para_birimi` varchar(5) NOT NULL DEFAULT 'TRY',
  `notlar` text DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `expert_reports`
--

CREATE TABLE `expert_reports` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `expert_report_photos`
--

CREATE TABLE `expert_report_photos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `faturalar`
--

CREATE TABLE `faturalar` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `fatura_no` varchar(50) NOT NULL,
  `keska_arsiv_no` varchar(80) DEFAULT NULL,
  `tur` enum('satis','alis','satis_iade','alis_iade') NOT NULL DEFAULT 'satis',
  `contact_id` bigint(20) UNSIGNED DEFAULT NULL,
  `hakedis_id` bigint(20) UNSIGNED DEFAULT NULL,
  `fatura_tarihi` date NOT NULL,
  `vade_tarihi` date DEFAULT NULL,
  `kdv_dahil` tinyint(1) NOT NULL DEFAULT 0,
  `ara_toplam` decimal(15,2) NOT NULL DEFAULT 0.00,
  `kdv_tutari` decimal(15,2) NOT NULL DEFAULT 0.00,
  `toplam` decimal(15,2) NOT NULL DEFAULT 0.00,
  `status` enum('taslak','onayli','iptal') NOT NULL DEFAULT 'taslak',
  `approved_at` timestamp NULL DEFAULT NULL,
  `approved_by` bigint(20) UNSIGNED DEFAULT NULL,
  `odeme_durumu` enum('bekliyor','odendi','kismi_odeme') NOT NULL DEFAULT 'bekliyor',
  `odenen_tutar` decimal(15,2) NOT NULL DEFAULT 0.00,
  `aciklama` text DEFAULT NULL,
  `proje_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `fatura_kalemleri`
--

CREATE TABLE `fatura_kalemleri` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `fatura_id` bigint(20) UNSIGNED NOT NULL,
  `tanim` varchar(500) NOT NULL,
  `miktar` decimal(10,3) NOT NULL DEFAULT 1.000,
  `birim` varchar(20) DEFAULT NULL,
  `birim_fiyat` decimal(15,2) NOT NULL DEFAULT 0.00,
  `kdv_orani` decimal(5,2) NOT NULL DEFAULT 18.00,
  `kdv_tutari` decimal(15,2) NOT NULL DEFAULT 0.00,
  `tutar` decimal(15,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `field_data_entries`
--

CREATE TABLE `field_data_entries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `field_plan_type` varchar(255) DEFAULT NULL,
  `field_plan_id` bigint(20) UNSIGNED DEFAULT NULL,
  `work_type` varchar(255) NOT NULL DEFAULT 'sondaj',
  `submitted_by` bigint(20) UNSIGNED NOT NULL,
  `well_number` varchar(255) DEFAULT NULL,
  `measurement_type` varchar(255) DEFAULT NULL,
  `depth_meters` decimal(8,2) DEFAULT NULL,
  `quantity` decimal(8,2) DEFAULT NULL,
  `work_date` date NOT NULL,
  `notes` text DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'beklemede',
  `reviewed_by` bigint(20) UNSIGNED DEFAULT NULL,
  `reviewed_at` timestamp NULL DEFAULT NULL,
  `rejection_reason` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `field_plans`
--

CREATE TABLE `field_plans` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `module_type` varchar(255) DEFAULT NULL,
  `scheduled_date` date NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'planlandı',
  `notes` text DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `field_plan_personnel`
--

CREATE TABLE `field_plan_personnel` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `field_plan_id` bigint(20) UNSIGNED NOT NULL,
  `personnel_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `field_plan_service_items`
--

CREATE TABLE `field_plan_service_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `field_plan_id` bigint(20) UNSIGNED NOT NULL,
  `service_item_id` bigint(20) UNSIGNED NOT NULL,
  `planned_quantity` decimal(10,2) NOT NULL DEFAULT 0.00,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `field_plan_vehicles`
--

CREATE TABLE `field_plan_vehicles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `field_plan_id` bigint(20) UNSIGNED NOT NULL,
  `vehicle_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `field_work_log_personnel`
--

CREATE TABLE `field_work_log_personnel` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `field_work_log_id` bigint(20) UNSIGNED NOT NULL,
  `personnel_id` bigint(20) UNSIGNED NOT NULL,
  `position_snapshot` varchar(255) DEFAULT NULL,
  `role_snapshot` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `field_work_log_vehicles`
--

CREATE TABLE `field_work_log_vehicles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `field_work_log_id` bigint(20) UNSIGNED NOT NULL,
  `vehicle_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `hakedisler`
--

CREATE TABLE `hakedisler` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hakedis_no` varchar(255) NOT NULL,
  `tip` varchar(20) NOT NULL DEFAULT 'musteri',
  `siparis_id` bigint(20) UNSIGNED NOT NULL,
  `contact_id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `hakedis_date` date NOT NULL,
  `mode` varchar(20) NOT NULL DEFAULT 'kalem',
  `subtotal` decimal(15,2) NOT NULL DEFAULT 0.00,
  `kdv_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `total_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `status` varchar(20) NOT NULL DEFAULT 'taslak',
  `approved_at` timestamp NULL DEFAULT NULL,
  `approved_by` bigint(20) UNSIGNED DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `hakedis_kalemleri`
--

CREATE TABLE `hakedis_kalemleri` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hakedis_id` bigint(20) UNSIGNED NOT NULL,
  `siparis_kalem_id` bigint(20) UNSIGNED DEFAULT NULL,
  `service_item_id` bigint(20) UNSIGNED DEFAULT NULL,
  `item_code` varchar(60) DEFAULT NULL,
  `item_name` varchar(255) DEFAULT NULL,
  `category` varchar(60) DEFAULT NULL,
  `category_label` varchar(120) DEFAULT NULL,
  `unit` varchar(255) DEFAULT NULL,
  `quantity_done` decimal(15,3) NOT NULL DEFAULT 0.000,
  `unit_price` decimal(15,2) NOT NULL DEFAULT 0.00,
  `kdv_rate` decimal(5,2) NOT NULL DEFAULT 0.00,
  `subtotal` decimal(15,2) NOT NULL DEFAULT 0.00,
  `kdv_amount` 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `harita_role_categories`
--

CREATE TABLE `harita_role_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `poi_category_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `harita_role_devices`
--

CREATE TABLE `harita_role_devices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `tracked_device_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `inventory_categories`
--

CREATE TABLE `inventory_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `parent_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `inventory_items`
--

CREATE TABLE `inventory_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `inventory_movements`
--

CREATE TABLE `inventory_movements` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `izin_talepleri`
--

CREATE TABLE `izin_talepleri` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `employee_id` bigint(20) UNSIGNED NOT NULL,
  `izin_turu_id` bigint(20) UNSIGNED NOT NULL,
  `baslangic_tarihi` date NOT NULL,
  `bitis_tarihi` date NOT NULL,
  `gun_sayisi` int(11) NOT NULL DEFAULT 1,
  `aciklama` text DEFAULT NULL,
  `durum` enum('bekliyor','onaylandi','reddedildi') NOT NULL DEFAULT 'bekliyor',
  `onaylayan_id` bigint(20) UNSIGNED DEFAULT NULL,
  `red_aciklamasi` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `izin_turleri`
--

CREATE TABLE `izin_turleri` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ad` varchar(100) NOT NULL,
  `max_gun` int(11) DEFAULT NULL,
  `ucretli` tinyint(1) NOT NULL DEFAULT 1,
  `renk` varchar(20) NOT NULL DEFAULT '#6366f1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `jeofizik_field_plans`
--

CREATE TABLE `jeofizik_field_plans` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `plan_number` varchar(30) DEFAULT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `scheduled_date` date NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'planlandı',
  `notes` text DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `jeofizik_field_plan_personnel`
--

CREATE TABLE `jeofizik_field_plan_personnel` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `jeofizik_field_plan_id` bigint(20) UNSIGNED NOT NULL,
  `personnel_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `jeofizik_field_plan_vehicles`
--

CREATE TABLE `jeofizik_field_plan_vehicles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `jeofizik_field_plan_id` bigint(20) UNSIGNED NOT NULL,
  `vehicle_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `job_batches`
--

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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `laboratory_samples`
--

CREATE TABLE `laboratory_samples` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `lab_firms`
--

CREATE TABLE `lab_firms` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `short_name` varchar(50) NOT NULL,
  `address` varchar(255) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `lab_firms`
--

INSERT INTO `lab_firms` (`id`, `name`, `short_name`, `address`, `phone`, `email`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'SONAT LABORATUVAR', 'SONAT', NULL, NULL, NULL, 1, 1, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(2, 'ARTER MÜHENDİSLİK MAK. İN. SAN. VE TİC. LTD. ŞTİ.', 'ARTER', NULL, NULL, NULL, 1, 2, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(3, 'ÇÖZÜM JEOTEKNİK LABORATUVARI', 'ÇÖZÜM', NULL, NULL, NULL, 1, 3, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(4, 'JEOLAB ZEMİN LABORATUVARI', 'JEOLAB', NULL, NULL, NULL, 1, 4, '2026-05-16 17:17:15', '2026-05-16 17:17:15');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `lab_tests`
--

CREATE TABLE `lab_tests` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `lab_firm_id` bigint(20) UNSIGNED NOT NULL,
  `test_name` varchar(255) NOT NULL,
  `test_code` varchar(100) DEFAULT NULL,
  `category` enum('zemin','kaya','agrega') NOT NULL DEFAULT 'zemin',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `lab_tests`
--

INSERT INTO `lab_tests` (`id`, `lab_firm_id`, `test_name`, `test_code`, `category`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 1, 'Doğal Birim Hacim Ağırlık', NULL, 'zemin', 1, 1, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(2, 1, 'Kuru Birim Hacim Ağırlık', NULL, 'zemin', 1, 2, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(3, 1, 'Su İçeriği (%)', NULL, 'zemin', 1, 3, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(4, 1, 'Elek Analizi', NULL, 'zemin', 1, 4, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(5, 1, 'Atterberg Limitleri', NULL, 'zemin', 1, 5, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(6, 1, 'Hidrometre Deneyi', NULL, 'zemin', 1, 6, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(7, 1, 'Konsolidasyon Deneyi', NULL, 'zemin', 1, 7, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(8, 1, 'Konsolidasyon + Şişme Deneyi', NULL, 'zemin', 1, 8, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(9, 1, 'Üç Eksenli Basınç Deneyi (UU)', NULL, 'zemin', 1, 9, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(10, 1, 'Tek Eksenli Basınç Deneyi', NULL, 'zemin', 1, 10, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(11, 1, 'Kesme Kutusu Deneyi', NULL, 'zemin', 1, 11, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(12, 1, 'Proktor & CBR Deneyi', NULL, 'zemin', 1, 12, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(13, 1, 'Kayada Nokta Yükleme Deneyi', NULL, 'kaya', 1, 13, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(14, 1, 'Kayada Birim Hacim Ağırlık', NULL, 'kaya', 1, 14, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(15, 1, 'Kayada Tek Eksenli Basınç Deneyi', NULL, 'kaya', 1, 15, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(16, 2, 'SPT Deneyleri - Sınıflandırma Deneyleri', NULL, 'zemin', 1, 1, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(17, 2, 'Sınıflandırma + Basınç Deneyleri - Konsolidasyon', NULL, 'zemin', 1, 2, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(18, 2, 'Sınıflandırma + Basınç Deneyleri - Elek Analizi', NULL, 'zemin', 1, 3, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(19, 2, 'Hidrametrik Analiz', NULL, 'zemin', 1, 4, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(20, 2, 'Atterberg Limitleri', NULL, 'zemin', 1, 5, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(21, 2, 'Su Muhtevasının Tayini', NULL, 'zemin', 1, 6, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(22, 2, 'Özgül Ağırlık', NULL, 'zemin', 1, 7, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(23, 2, 'Doğal Birim Hacim Ağırlık', NULL, 'zemin', 1, 8, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(24, 2, 'Kuru Birim Hacim Ağırlık', NULL, 'zemin', 1, 9, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(25, 2, 'Üç Eksenli Basınç Deneyi (UU)', NULL, 'zemin', 1, 10, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(26, 2, 'Üç Eksenli Basınç Deneyi (CIU)', NULL, 'zemin', 1, 11, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(27, 2, 'Üç Eksenli Basınç Deneyi (CID)', NULL, 'zemin', 1, 12, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(28, 2, 'Tek Eksenli Basınç Deneyi', NULL, 'zemin', 1, 13, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(29, 2, 'Konsolidasyon (Oedometer) Deneyi', NULL, 'zemin', 1, 14, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(30, 2, 'Şişme Basıncı', NULL, 'zemin', 1, 15, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(31, 2, 'Şişme Yüzdesi', NULL, 'zemin', 1, 16, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(32, 2, 'Kesme Kutusu (Direkt Kesme)', NULL, 'zemin', 1, 17, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(33, 2, 'Direkt Kesme (CID)', NULL, 'zemin', 1, 18, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(34, 2, 'Direkt Kesme (Drenajsız-Rezidüel)', NULL, 'zemin', 1, 19, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(35, 2, 'Standart Proktor Deneyi', NULL, 'zemin', 1, 20, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(36, 2, 'Modifiye Proktor Deneyi', NULL, 'zemin', 1, 21, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(37, 2, 'CBR Deneyi (Yaş)', NULL, 'zemin', 1, 22, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(38, 2, 'CBR Deneyi (Kuru)', NULL, 'zemin', 1, 23, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(39, 2, 'Düşen Seviyeli Permeabilite Deneyi', NULL, 'zemin', 1, 24, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(40, 2, 'Sabit Seviyeli Permeabilite Deneyi', NULL, 'zemin', 1, 25, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(41, 2, 'Nokta Yükleme Deneyi', NULL, 'kaya', 1, 26, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(42, 2, 'Üç Eksenli Basınç Deneyi (Kaya)', NULL, 'kaya', 1, 27, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(43, 2, 'Tek Eksenli Basınç Deneyi (Kaya)', NULL, 'kaya', 1, 28, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(44, 2, 'Karot Düzeltme', NULL, 'kaya', 1, 29, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(45, 2, 'Don Sonu Basınç Deneyi', NULL, 'kaya', 1, 30, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(46, 2, 'Görünür Gözeneklilik Tayini', NULL, 'kaya', 1, 31, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(47, 2, 'Su Emme Deneyi', NULL, 'kaya', 1, 32, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(48, 2, 'Elastisite Modülü ve Poisson Oranı', NULL, 'kaya', 1, 33, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(49, 2, 'Tabii Birim Hacim Ağırlık Çekme Deneyi', NULL, 'kaya', 1, 34, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(50, 2, 'Brezilian Endirekt Çekme Deneyi', NULL, 'kaya', 1, 35, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(51, 2, 'Blok Numuneden Karot Alınması', NULL, 'kaya', 1, 36, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(52, 2, 'Agregada Tane Büyüklüğü Dağılımı', NULL, 'agrega', 1, 37, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(53, 2, 'Çifte Hidrometre Deneyi', NULL, 'agrega', 1, 38, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(54, 2, 'Yassılık İndeksi', NULL, 'agrega', 1, 39, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(55, 2, 'Şekil İndeksi', NULL, 'agrega', 1, 40, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(56, 2, 'İnce Madde Oranı', NULL, 'agrega', 1, 41, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(57, 2, 'Kil Topakları', NULL, 'agrega', 1, 42, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(58, 2, 'Magnezyum Sülfat Deneyi', NULL, 'agrega', 1, 43, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(59, 2, 'Gevşek Birim Ağırlık', NULL, 'agrega', 1, 44, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(60, 2, 'Sıkışık Birim Ağırlık', NULL, 'agrega', 1, 45, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(61, 2, 'İğne Deliği', NULL, 'agrega', 1, 46, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(62, 2, 'Los Angeles ve Su Emme Oranı', NULL, 'agrega', 1, 47, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(63, 2, 'Alkali Agrega Reaktivitesi', NULL, 'agrega', 1, 48, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(64, 2, 'Organik Kökenli Madde Tayini', NULL, 'agrega', 1, 49, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(65, 3, 'Doğal Su Muhtevası', 'TS EN ISO 17892-1', 'zemin', 1, 1, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(66, 3, 'Doğal Birim Hacim Ağırlık', 'TS EN ISO 17892-2', 'zemin', 1, 2, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(67, 3, 'Kuru Birim Hacim Ağırlık', 'TS EN ISO 17892-2', 'zemin', 1, 3, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(68, 3, 'Özgül Ağırlık', 'TS 1900-1', 'zemin', 1, 4, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(69, 3, 'Tane Yoğunluğu', 'TS EN ISO 17892-3', 'zemin', 1, 5, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(70, 3, 'Hidrometre Analizi', 'TS 1900-1', 'zemin', 1, 6, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(71, 3, 'Elek Analizi', 'TS 1900-1', 'zemin', 1, 7, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(72, 3, 'Likit Limit (Tek Nokta)', 'TS 1900-1', 'zemin', 1, 8, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(73, 3, 'Likit Limit (Beş Nokta)', 'TS 1900-1', 'zemin', 1, 9, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(74, 3, 'Plastik Limitin Tayini', 'TS 1900-1', 'zemin', 1, 10, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(75, 3, 'Üç Eksenli Basınç (UU)', 'TS 1900-2', 'zemin', 1, 11, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(76, 3, 'Üç Eksenli Basınç (CU)', 'TS 1900-2', 'zemin', 1, 12, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(77, 3, 'Üç Eksenli Basınç (CD)', 'TS 1900-2', 'zemin', 1, 13, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(78, 3, 'Kesme Kutusu (UU)', 'TS 1900-2', 'zemin', 1, 14, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(79, 3, 'Serbest Basınç', 'TS 1900-2', 'zemin', 1, 15, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(80, 3, 'Konsolidasyon', 'TS 1900-2', 'zemin', 1, 16, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(81, 3, 'Şişme Yüzdesi + Şişme Basıncı', 'TS 1900-2', 'zemin', 1, 17, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(82, 3, 'Düşen Seviyeli Permeabilite', 'ASTM D 5856', 'zemin', 1, 18, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(83, 3, 'Sabit Seviyeli Permeabilite', 'BS 1377', 'zemin', 1, 19, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(84, 3, 'Standart Proctor', 'TS 1900-1', 'zemin', 1, 20, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(85, 3, 'Modifiye Proctor', 'TS 1900-1', 'zemin', 1, 21, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(86, 3, 'CBR', 'TS 1900-2', 'zemin', 1, 22, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(87, 3, 'İğne Deliği', 'TS 1900-2', 'zemin', 1, 23, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(88, 3, 'Dağılma Deneyi', 'TS 1900-2', 'zemin', 1, 24, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(89, 3, 'Çifte Hidrometre', 'ASTM D4221-90', 'zemin', 1, 25, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(90, 3, 'Tek Eksenli Büzülmenin Tayini', 'TS 1900-1', 'zemin', 1, 26, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(91, 3, 'Hacimsel Büzülmenin Tayini', 'TS 1900-1', 'zemin', 1, 27, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(92, 3, 'Maksimum Birim Hacim Ağırlık', 'ASTM D 4253', 'zemin', 1, 28, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(93, 3, 'Minimum Birim Hacim Ağırlık', 'ASTM D 4254', 'zemin', 1, 29, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(94, 3, 'Nokta Yükleme', 'TS 699', 'kaya', 1, 30, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(95, 3, 'Tek Eksenli Basınç (Kaya)', 'TS EN 1926', 'kaya', 1, 31, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(96, 3, 'Üç Eksenli Basınç (Kaya)', 'TS 699', 'kaya', 1, 32, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(97, 3, 'Elastisite Modülü & Poisson', 'TS 2030', 'kaya', 1, 33, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(98, 3, 'İndirekt Çekme', 'TS 7654', 'kaya', 1, 34, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(99, 3, 'Eğilme Dayanımı Tayini', 'TS EN 12372', 'kaya', 1, 35, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(100, 3, 'Don Sonu Basınç Dayanımı', 'TS 699', 'kaya', 1, 36, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(101, 3, 'Su Emme Tayini', 'TS EN 13755', 'kaya', 1, 37, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(102, 3, 'Görünür Yoğunluk & Gözeneklilik', 'TS EN 1936', 'kaya', 1, 38, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(103, 3, 'Mohs Sertlik Tayini', 'TS 6809:1989', 'kaya', 1, 39, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(104, 3, 'Los Angeles (100 Devir)', 'TS EN 1097-2', 'agrega', 1, 40, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(105, 3, 'Los Angeles (500 Devir)', 'TS EN 1097-2', 'agrega', 1, 41, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(106, 3, 'Yassılık Endeksi', 'TS 9582 EN 933-3', 'agrega', 1, 42, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(107, 3, 'Tane Yoğunluğu & Su Emme', 'TS EN 1097-6', 'agrega', 1, 43, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(108, 3, 'Gevşek Yığın Yoğunluğu', 'TS EN 1067-2', 'agrega', 1, 44, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(109, 3, 'Magnezyum Sülfat Deneyi', 'TS EN 1097-2', 'agrega', 1, 45, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(110, 3, 'Kil Topakları Tayini', 'ASTM C 142', 'agrega', 1, 46, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(111, 3, 'Humus Muhtevası (Organik Madde)', 'TS EN 1744-1', 'agrega', 1, 47, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(112, 4, 'Elek Analizi', NULL, 'zemin', 1, 1, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(113, 4, 'Hidrametrik Analiz', NULL, 'zemin', 1, 2, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(114, 4, 'Atterberg Limitleri', NULL, 'zemin', 1, 3, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(115, 4, 'Su Muhtevasının Tayini', NULL, 'zemin', 1, 4, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(116, 4, 'Özgül Ağırlık', NULL, 'zemin', 1, 5, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(117, 4, 'Doğal Birim Hacim Ağırlık', NULL, 'zemin', 1, 6, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(118, 4, 'Kuru Birim Hacim Ağırlık', NULL, 'zemin', 1, 7, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(119, 4, 'Üç Eksenli (UU) Deneyi', NULL, 'zemin', 1, 8, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(120, 4, 'Üç Eksenli (CIU) Deneyi', NULL, 'zemin', 1, 9, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(121, 4, 'Üç Eksenli (CID) Deneyi', NULL, 'zemin', 1, 10, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(122, 4, 'Tek Eksenli Basınç Deneyi', NULL, 'zemin', 1, 11, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(123, 4, 'Konsolidasyon (Oedometer) Deneyi', NULL, 'zemin', 1, 12, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(124, 4, 'Kesme Kutusu Deneyi', NULL, 'zemin', 1, 13, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(125, 4, 'Direkt Kesme (CID)', NULL, 'zemin', 1, 14, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(126, 4, 'Direkt Kesme (Drenajsız-Kalıntı)', NULL, 'zemin', 1, 15, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(127, 4, 'Standart Proktor Deneyi', NULL, 'zemin', 1, 16, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(128, 4, 'Modifiye Proktor Deneyi', NULL, 'zemin', 1, 17, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(129, 4, 'CBR Deneyi', NULL, 'zemin', 1, 18, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(130, 4, 'Nokta Yükleme Deneyi', NULL, 'kaya', 1, 19, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(131, 4, 'Üç Eksenli Basınç (Kaya)', NULL, 'kaya', 1, 20, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(132, 4, 'Tek Eksenli Basınç (Kaya)', NULL, 'kaya', 1, 21, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(133, 4, 'Don Sonu Basınç Deneyi', NULL, 'kaya', 1, 22, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(134, 4, 'Görünür Gözeneklilik', NULL, 'kaya', 1, 23, '2026-05-16 17:17:15', '2026-05-16 17:17:15'),
(135, 4, 'Elastisite Modülü & Poisson Oranı', NULL, 'kaya', 1, 24, '2026-05-16 17:17:15', '2026-05-16 17:17:15');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `machines`
--

CREATE TABLE `machines` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `machine_number` varchar(30) DEFAULT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `maintenance_parts`
--

CREATE TABLE `maintenance_parts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `maintenance_records`
--

CREATE TABLE `maintenance_records` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `maintenance_number` varchar(30) DEFAULT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `maintenance_schedules`
--

CREATE TABLE `maintenance_schedules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `map_pois`
--

CREATE TABLE `map_pois` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(20) DEFAULT NULL,
  `category_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(200) NOT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `address` varchar(500) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `lat` decimal(10,7) NOT NULL,
  `lng` decimal(10,7) NOT NULL,
  `contact_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) 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', 1),
(19, '2026_03_14_000002_add_ada_to_projects', 1),
(20, '2026_03_15_000001_create_laboratory_samples_table', 1),
(21, '2026_03_15_100001_create_settings_table', 1),
(22, '2026_03_15_200001_create_project_assignees_table', 1),
(23, '2026_03_16_000001_create_field_plans_table', 1),
(24, '2026_03_16_000002_simplify_field_plan_statuses', 1),
(25, '2026_03_17_100001_create_muhasebe_tables', 1),
(26, '2026_03_17_100002_create_ik_tables', 1),
(27, '2026_03_17_100003_create_chat_tables', 1),
(28, '2026_03_17_124350_add_coordinates_to_projects_table', 1),
(29, '2026_03_17_130035_add_performance_indexes', 1),
(30, '2026_03_19_100001_add_department_gorev_to_personnel_table', 1),
(31, '2026_03_20_192159_add_reply_to_id_to_chat_messages', 1),
(32, '2026_03_23_212804_change_responsible_to_personnel_in_projects', 1),
(33, '2026_03_26_000001_add_module_type_to_field_plans', 1),
(34, '2026_03_26_113030_add_manual_progress_to_projects_table', 1),
(35, '2026_03_26_114333_add_previous_status_to_projects_table', 1),
(36, '2026_03_26_120000_create_activity_logs_table', 1),
(37, '2026_03_26_200000_add_numbering_to_modules', 1),
(38, '2026_03_27_072148_create_field_work_log_personnel_table', 1),
(39, '2026_03_27_085540_create_service_items_table', 1),
(40, '2026_03_27_090628_add_service_item_to_field_work_tables', 1),
(41, '2026_03_27_091123_add_service_item_to_proposal_items', 1),
(42, '2026_03_27_091358_create_field_plan_service_items_table', 1),
(43, '2026_03_27_092648_create_service_categories_and_update_service_items', 1),
(44, '2026_03_27_155931_create_project_planned_works_table', 1),
(45, '2026_03_27_162032_update_proposals_status_column_to_varchar', 1),
(46, '2026_03_28_000001_add_project_fields_to_proposals_table', 1),
(47, '2026_03_28_000002_add_musteri_tedarikci_numbering_settings', 1),
(48, '2026_03_28_000003_add_musteri_tedarikci_number_columns_to_contacts', 1),
(49, '2026_03_28_000004_backfill_musteri_tedarikci_numbers', 1),
(50, '2026_03_28_112942_add_subcontractor_cost_to_proposals_table', 1),
(51, '2026_03_31_000001_rename_pressiyometre_to_arazi_deneyleri', 1),
(52, '2026_03_31_100001_add_payment_plan_and_responsibilities', 1),
(53, '2026_03_31_100001_create_field_data_entries_table', 1),
(54, '2026_03_31_110001_add_work_type_to_field_data_entries', 1),
(55, '2026_03_31_120001_add_saha_permissions', 1),
(56, '2026_03_31_150000_create_proposal_item_templates', 1),
(57, '2026_03_31_151103_create_sondaj_field_plans_table', 1),
(58, '2026_03_31_151105_create_jeofizik_field_plans_table', 1),
(59, '2026_03_31_151917_add_plan_type_to_field_data_entries', 1),
(60, '2026_04_01_073410_add_sondaj_count_to_proposal_items', 1),
(61, '2026_04_01_083740_add_project_name_to_proposals', 1),
(62, '2026_04_01_122710_add_sondaj_count_to_proposal_subcontractor_quote_items', 1),
(63, '2026_04_01_123726_make_description_nullable_in_sq_items', 1),
(64, '2026_04_01_200001_add_has_metraj_and_sondaj_fields', 1),
(65, '2026_04_02_120935_make_well_number_nullable_in_field_data_entries', 1),
(66, '2026_04_03_120000_dedupe_proposal_payment_and_responsibility_items', 1),
(67, '2026_04_03_120000_field_work_statistics_links', 1),
(68, '2026_04_04_100000_add_module_istatistikler_permission', 1),
(69, '2026_04_06_100000_create_subcontractor_quote_payment_and_responsibilities', 1),
(70, '2026_04_06_112941_create_project_progress_components_table', 1),
(71, '2026_04_06_200000_create_proposal_templates_table', 1),
(72, '2026_04_07_062845_add_parent_proposal_to_proposals_table', 1),
(73, '2026_04_08_000001_create_lab_firms_and_tests_tables', 1),
(74, '2026_04_08_000002_create_sondaj_logs_table', 1),
(75, '2026_04_11_063439_add_yass_entries_to_sondaj_logs_table', 1),
(76, '2026_04_17_150433_change_spt_columns_to_string_in_sondaj_log_rows', 1),
(77, '2026_04_18_144323_add_zemin_profili_svg_to_sondaj_log_rows', 1),
(78, '2026_04_21_100001_add_payment_fields_to_cari_entries', 1),
(79, '2026_04_21_152746_create_contact_notes_table', 1),
(80, '2026_04_21_153720_add_reminder_date_to_contact_notes_table', 1),
(81, '2026_04_22_160000_create_siparisler_tables', 1),
(82, '2026_04_22_170000_add_info_columns_to_siparis_kalemleri', 1),
(83, '2026_04_23_120000_drop_yevmiye_hesap_plani_tables', 1),
(84, '2026_04_23_140000_create_hakedis_tables', 1),
(85, '2026_04_23_140001_add_hakedis_id_to_cari_entries', 1),
(86, '2026_04_24_100000_add_hakedis_fields_to_faturalar', 1),
(87, '2026_04_24_100001_add_fatura_id_to_cari_entries', 1),
(88, '2026_04_24_111846_add_username_to_users_table', 1),
(89, '2026_04_24_140059_add_pafta_to_projects_and_proposals', 1),
(90, '2026_04_25_100000_add_status_and_close_fields', 1),
(91, '2026_04_25_110721_create_poi_categories_table', 1),
(92, '2026_04_25_110722_create_map_pois_table', 1),
(93, '2026_04_25_115151_create_tracked_devices_table', 1),
(94, '2026_04_25_115152_create_device_locations_table', 1),
(95, '2026_04_27_150000_add_code_to_map_pois_table', 1),
(96, '2026_04_27_200000_add_intake_fields_to_proposals_table', 1),
(97, '2026_04_27_210000_add_discount_to_proposals_and_items', 1),
(98, '2026_04_30_151704_make_email_nullable_in_users_table', 1),
(99, '2026_05_02_070548_create_harita_role_categories_table', 1),
(100, '2026_05_02_070549_create_harita_role_devices_table', 1),
(101, '2026_05_02_100001_add_device_number_to_tracked_devices', 1),
(102, '2026_05_02_100002_seed_hardcoded_numbering_settings', 1),
(103, '2026_05_02_200001_add_number_columns_to_missing_tables', 1),
(104, '2026_05_02_200002_seed_new_numbering_settings', 1),
(105, '2026_05_05_124210_rename_sicil_no_to_personel_kodu_in_employees', 1),
(106, '2026_05_05_130057_add_personnel_id_to_employees_table', 1),
(107, '2026_05_06_073849_create_versions_table', 1),
(108, '2026_05_11_084933_upgrade_unit_price_precision_for_proposal_items', 1),
(109, '2026_05_13_100000_create_notification_recipients_table', 1),
(110, '2026_05_13_100001_create_notification_logs_table', 1),
(111, '2026_05_13_100002_create_push_subscriptions_table', 1),
(112, '2026_05_13_100003_seed_notification_permissions', 1),
(113, '2026_05_15_115254_merge_taseron_into_tedarikci', 1),
(114, '2026_05_15_121139_add_tip_to_siparisler_for_tedarikci', 1),
(115, '2026_05_15_123109_add_tip_to_hakedisler_for_tedarikci', 1),
(116, '2026_05_15_140718_set_year_based_numbering_for_financial_modules', 1),
(117, '2026_05_16_122324_add_latitude_longitude_to_proposals', 1),
(118, '2026_05_16_140000_add_termination_date_to_personnel', 1),
(119, '2026_05_16_180000_remove_employee_sicil_numbering_settings', 1),
(120, '2026_05_16_200000_add_plain_password_to_users', 1),
(121, '2026_05_16_210000_refactor_progress_milestones_log_lab', 1),
(122, '2026_05_17_120000_add_completion_tracking_to_project_planned_works', 2),
(123, '2026_05_17_120001_add_etut_proje_diger_permission', 2),
(124, '2026_05_17_140000_create_project_other_completions_table', 3),
(125, '2026_05_17_140100_backfill_other_completions_from_planned_works', 3);

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `model_has_permissions`
--

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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `model_has_roles`
--

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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(1, 'App\\Models\\User', 1),
(1, 'App\\Models\\User', 11);

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `notification_logs`
--

CREATE TABLE `notification_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sent_date` date NOT NULL,
  `sent_time` time NOT NULL,
  `event_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `sms_sent` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `email_sent` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `push_sent` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `status` varchar(20) NOT NULL,
  `notes` text DEFAULT NULL,
  `details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`details`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `notification_recipients`
--

CREATE TABLE `notification_recipients` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `send_sms` tinyint(1) NOT NULL DEFAULT 1,
  `send_email` tinyint(1) NOT NULL DEFAULT 1,
  `send_push` tinyint(1) NOT NULL DEFAULT 1,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(3, 'teklifler', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(4, 'teklifler.olustur', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(5, 'teklifler.duzenle', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(6, 'teklifler.sil', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(7, 'teklifler.revize', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(8, 'teklifler.durum', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(9, 'teklifler.donustur', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(10, 'teklifler.taseron', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(11, 'teklifler.taseron.olustur', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(12, 'teklifler.taseron.duzenle', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(13, 'teklifler.taseron.sil', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(14, 'teklifler.taseron.durum', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(15, 'teklifler.sablonlar', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(16, 'etut_proje', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(17, 'etut_proje.olustur', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(18, 'etut_proje.duzenle', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(19, 'etut_proje.sil', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(20, 'etut_proje.durum', 'web', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
(21, 'etut_proje.kapsam', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(22, 'etut_proje.saha', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(23, 'etut_proje.lab', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(24, 'etut_proje.kml', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(25, 'etut_proje.log_onay', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(26, 'bakim_onarim', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(27, 'envanter', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(28, 'muhasebe', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(29, 'ik', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(30, 'harita', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(31, 'harita.kategoriler', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(32, 'harita.poi.ekle', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(33, 'harita.poi.duzenle', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(34, 'harita.poi.sil', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(35, 'sondaj', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(36, 'jeofizik', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(37, 'saha', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(38, 'saha.sondaj', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(39, 'saha.sondaj.gir', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(40, 'saha.sondaj.duzenle', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(41, 'saha.sondaj.sil', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(42, 'saha.jeofizik', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(43, 'saha.jeofizik.gir', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(44, 'saha.jeofizik.duzenle', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(45, 'saha.jeofizik.sil', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(46, 'saha.log', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(47, 'saha.log.olustur', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(48, 'saha.log.duzenle', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(49, 'saha.log.sil', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(50, 'saha.log.gonder', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(51, 'istatistikler', 'web', '2026-05-16 17:17:12', '2026-05-16 17:17:12'),
(52, 'yonetim_paneli', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(53, 'rehber', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(54, 'rehber.olustur', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(55, 'rehber.duzenle', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(56, 'rehber.sil', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(57, 'rehber.projeler', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(58, 'rehber.teklifler', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(59, 'rehber.siparisler', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(60, 'rehber.hakedisler', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(61, 'rehber.faturalar', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(62, 'rehber.cari', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(63, 'rehber.notlar', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(64, 'bildirimler.yonet', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(65, 'bildirimler.al', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(66, 'etut_proje.diger', 'web', '2026-05-17 08:51:23', '2026-05-17 08:51:23');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `personnel`
--

CREATE TABLE `personnel` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `personnel_number` varchar(30) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `department_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,
  `gorev` varchar(255) DEFAULT NULL,
  `hire_date` date DEFAULT NULL,
  `termination_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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `personnel`
--

INSERT INTO `personnel` (`id`, `personnel_number`, `user_id`, `department_id`, `first_name`, `last_name`, `tc_no`, `phone`, `email`, `position`, `gorev`, `hire_date`, `termination_date`, `birth_date`, `address`, `emergency_contact`, `emergency_phone`, `blood_type`, `license_types`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'PRS_0191', 2, 1, 'Fahrettin', 'BELCİ', '13597784802', '05375556110', NULL, 'Jeofizik Müh.', 'Etüt ve Proje Şef', '2025-11-19', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-17 08:22:50'),
(2, 'PRS_0061', 3, 1, 'Ebru Ekşi', 'ONAT', '22355548464', '05316954091', NULL, 'Jeofizik Müh.', 'Jeofizik Mühendisi (Raportör)', '2019-06-13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-17 08:22:50'),
(3, 'PRS_0203', 4, 1, 'Begüm', 'GÜNEŞ', '16717392758', '05419361306', NULL, 'İnşaat Müh.', 'Jeoloji Mühendisi (Raportör)', '2026-04-30', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-17 08:22:50'),
(4, 'PRS_0063', 5, 1, 'Tamer', 'ONAT', '36742827100', '05382461242', NULL, 'Jeofizik Müh.', 'Jeofizik Mühendisi (Raportör)', '2019-07-05', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-17 08:22:51'),
(5, 'PRS_0127', 6, 1, 'Ali Özenç', 'ŞAHİN', '12986692834', '05340797083', NULL, 'Jeoloji Müh.', 'Jeoloji Mühendisi (Raportör)', '2023-04-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-17 08:22:51'),
(6, 'PRS_0148', 7, 2, 'Metin', 'AYYILDIZ', '27700321068', '05317786921', NULL, 'Jeofizik Müh.', 'Jeofizik Mühendisi', '2024-05-21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-17 08:22:51'),
(7, 'PRS_0200', 8, 2, 'Melih', 'GÖKÇE', '14926863762', '05349286657', NULL, 'Jeofizik Müh.', 'Jeofizik Mühendisi', '2026-02-23', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-17 08:22:51'),
(8, 'PRS_0162', 9, 2, 'Emrah', 'MURAT', '45118935332', '05422180297', NULL, 'Jeofizik Müh.', 'Jeofizik Mühendisi (Şef)', '2025-05-24', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-17 08:22:52'),
(9, 'PRS_0205', 10, 3, 'Hakan', 'DANACI', '35971865396', '05314395646', NULL, 'Muhasebe ve Finansman Müdürü', 'İK Muhasebe Satın Alma vs.', '2026-05-04', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-17 08:22:52'),
(10, 'PRS_0149', 11, 3, 'Ömer', 'KIYAĞAN', '25153867928', '05326961156', NULL, 'İnşaat Müh.', 'İdari ve Mali İşler (Şef)', '2024-06-15', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:28:57'),
(11, 'PRS_0174', 12, 3, 'Elif', 'MUT', '43936588624', '05466140641', NULL, 'Yönetici Asistanı', 'Yönetici Asistanı', '2025-08-22', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:52'),
(12, 'PRS_0201', 13, 4, 'Mustafa', 'ÖZCAN', '18763997796', '05302286576', NULL, 'Bakım Onarımcı', 'Bakım-Onarım Personeli', '2026-03-04', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:53'),
(13, 'PRS_0163', 14, 4, 'Gökhan', 'TORAMAN', '26527179784', '05459183716', NULL, 'Bakım Onarımcı', 'Bakım-Onarım Personeli', '2025-05-27', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:53'),
(14, NULL, 15, 5, 'Kenan', 'YILDIZ', NULL, '05306524371', NULL, 'Lab Personeli', 'Lab Personeli', '2025-11-22', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:53'),
(15, 'PRS_0182', 16, 6, 'Hüseyin', 'BAYRAM', '23053373938', '05444212500', NULL, 'Sondaj İşçisi', 'Sondör', '2025-10-16', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:53'),
(16, 'PRS_0143', 17, 6, 'Yılmaz', 'ÇETİN', '21701060186', '05302646509', NULL, 'Sondaj İşçisi', 'Sondör Yardımcısı', '2024-04-09', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:54'),
(17, 'PRS_0166', 18, 6, 'Demirkan Fırat', 'DEMİRKAYA', '24481132746', '05427916895', NULL, 'Jeoloji Müh.', 'Jeoloji Mühendisi (Saha Şefi)', '2025-08-11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:54'),
(18, 'PRS_0185', 19, 6, 'Tuğberk', 'DOĞANÇAY', '22087601512', '05517117529', NULL, 'İnşaat Müh.', 'Saha Şefi Yardımcısı', '2025-10-21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:54'),
(19, 'PRS_0202', 20, 6, 'Özgür Sezer', 'FERMAN', '11099804080', '05318497054', NULL, 'Sondaj İşçisi', 'Sondör Yardımcısı', '2026-03-16', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:54'),
(20, 'PRS_0183', 21, 6, 'Sezgin', 'FERMAN', '45868644522', '05365036591', NULL, 'Sondaj İşçisi', 'Şoför ve Sondör', '2025-10-16', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:54'),
(21, 'PRS_0199', 22, 6, 'Vedat', 'KADAK', '10848074620', '05379288274', NULL, 'Sondaj İşçisi', 'Sondör Yardımcısı', '2026-01-31', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:55'),
(22, 'PRS_0196', 23, 6, 'Botir', 'MAKHMANAZAROV', '98101311712', '+998507554574', NULL, 'Genel İş İşçi', 'Genel İş İşçi (Beden İşçisi)', '2026-01-14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:55'),
(23, 'PRS_0144', 24, 6, 'Ergün', 'MÜLAYİM', '26977807466', '05439541822', NULL, 'Sondaj İşçisi', 'Sondör', '2024-04-15', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:55'),
(24, 'PRS_0145', 25, 6, 'Erkan', 'ÖZGÜR', '22244429706', '05365560379', NULL, 'Sondaj İşçisi', 'Şoför ve Sondör', '2024-04-15', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:55'),
(25, 'PRS_0195', 26, 6, 'Melih', 'TAŞDEMİR', '21416051448', '05544424171', NULL, 'Sondaj İşçisi', 'Sondör Yardımcısı', '2025-12-27', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:56'),
(26, 'PRS_0116', 27, 6, 'Muharrem', 'TORAMAN', '26680174688', '05323819930', NULL, 'Şoför', 'Şoför', '2022-06-17', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:56'),
(27, 'PRS_0160', 28, 6, 'Veli', 'UÇMAN', '58312108334', '05322713110', NULL, 'Şoför', 'Şoför', '2025-01-29', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:56'),
(28, 'PRS_0198', 29, 6, 'Necati', 'YALIN', '43633980578', '05468949421', NULL, 'Sondaj İşçisi', 'Sondör Yardımcısı', '2026-01-31', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-05-16 17:17:14', '2026-05-17 08:22:56'),
(29, 'PRS_0170', NULL, 2, 'Mehmet', 'DEMİRTAŞ', '16669965086', '05303257714', NULL, 'Jeofizik Müh.', 'Jeofizik Mühendisi', '2025-08-14', '2026-04-01', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(30, 'PRS_0177', NULL, 3, 'Mehmet', 'SEZER', '24148172054', '05309079819', NULL, 'Bilişim Sis. Müh.', 'IT Personeli', '2025-09-15', '2026-02-20', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(31, 'PRS_0188', NULL, 4, 'Serdarhan', 'KANPARA', '29975047384', '05053082341', NULL, 'Jeofizik Müh.', 'Bakım-Onarım Şefi', '2025-11-05', '2026-04-13', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(32, 'PRS_0190', NULL, 4, 'İbrahim', 'ŞAHİN', '45826814110', '05418763705', NULL, 'Bakım Onarımcı', 'Bakım-Onarım Personeli', '2025-11-17', '2026-01-20', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(33, 'PRS_0186', NULL, 6, 'Necdet', 'ÇİFTÇİ', '41567028632', '05533890694', NULL, 'Şoför', 'Şoför', '2025-10-22', '2026-02-06', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(34, 'PRS_0179', NULL, 6, 'Sedat', 'ONAY', '31909400714', '05394188825', NULL, 'Sondaj İşçisi', 'Sondör', '2025-09-27', '2026-01-22', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(35, NULL, NULL, 6, 'Necmettin', 'ÖNER', NULL, '05438998248', NULL, 'Sondaj İşçisi', 'Sondör', '2026-01-24', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-05-16 17:17:14', '2026-05-16 17:17:14'),
(36, 'PRS_0197', NULL, 6, 'Ali', 'TORA', '23402757112', '05533791590', NULL, 'Sondaj İşçisi', 'Sondör Yardımcısı', '2026-01-21', '2026-01-30', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-05-16 17:17:14', '2026-05-16 17:17:14');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `personnel_documents`
--

CREATE TABLE `personnel_documents` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `poi_categories`
--

CREATE TABLE `poi_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `slug` varchar(120) NOT NULL,
  `icon` varchar(10) NOT NULL DEFAULT '?',
  `color` varchar(7) NOT NULL DEFAULT '#6366f1',
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `projects`
--

CREATE TABLE `projects` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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',
  `previous_status` varchar(255) DEFAULT NULL,
  `manual_progress` tinyint(4) DEFAULT NULL,
  `status_note` varchar(255) DEFAULT NULL,
  `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,
  `pafta` varchar(100) DEFAULT NULL,
  `ada` varchar(255) DEFAULT NULL,
  `parcel` varchar(255) DEFAULT NULL,
  `area_m2` decimal(10,2) DEFAULT NULL,
  `latitude` decimal(10,7) DEFAULT NULL,
  `longitude` decimal(10,7) 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,
  `arazi_deneyleri_info` varchar(255) DEFAULT NULL,
  `arazi_deneyleri_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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `projects`
--

INSERT INTO `projects` (`id`, `project_number`, `proposal_id`, `contact_id`, `third_party_id`, `subcontractor_id`, `has_subcontractor`, `title`, `description`, `tags`, `visibility`, `status`, `previous_status`, `manual_progress`, `status_note`, `job_type`, `offer_file_no`, `urgency`, `city`, `district`, `neighborhood`, `pafta`, `ada`, `parcel`, `area_m2`, `latitude`, `longitude`, `incoming_documents`, `architectural_project_status`, `report_writing_hours`, `ownership_reference`, `customer_info_message`, `report_delivery`, `project_responsible_id`, `project_supervisor_id`, `manager_id`, `planned_work_count`, `drilling_days_per_machine`, `drilling_start_planned`, `drilling_team_planned`, `drilling_note`, `geophysics_start_planned`, `geophysics_team_planned`, `geophysics_note`, `drilling_info`, `drilling_completed`, `geophysics_info`, `geophysics_completed`, `arazi_deneyleri_info`, `arazi_deneyleri_completed`, `payment_plan`, `ledger_processed`, `progress_payment`, `contract_amount`, `subcontractor_amount`, `invoice_no`, `geology_engineer_id`, `civil_engineer_id`, `geotechnical_engineer_id`, `planned_start`, `planned_end`, `notes`, `created_at`, `updated_at`) VALUES
(1, 'PRJ_260001', 1, 1, NULL, NULL, 0, 'test', NULL, NULL, 'herkes', 'evrak_asamasi', NULL, NULL, NULL, 'proje', NULL, 'Normal', 'Kocaeli', 'Gölcük', 'Ş.Değirmendere Köyü', '20J3', '199', '3', 404.00, 40.7181140, 29.7857200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-05-17', NULL, NULL, '2026-05-17 08:12:42', '2026-05-17 08:12:42');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_assignees`
--

CREATE TABLE `project_assignees` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_documents`
--

CREATE TABLE `project_documents` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_field_measurements`
--

CREATE TABLE `project_field_measurements` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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,
  `service_item_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_field_wells`
--

CREATE TABLE `project_field_wells` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `field_work_log_id` bigint(20) UNSIGNED NOT NULL,
  `well_number` varchar(255) NOT NULL,
  `depth_meters` decimal(8,2) NOT NULL,
  `quantity` decimal(10,2) NOT NULL DEFAULT 0.00,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `service_item_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_field_work_logs`
--

CREATE TABLE `project_field_work_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `log_number` varchar(30) DEFAULT NULL,
  `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,
  `field_data_entry_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_machines`
--

CREATE TABLE `project_machines` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_notes`
--

CREATE TABLE `project_notes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_other_completions`
--

CREATE TABLE `project_other_completions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `project_planned_work_id` bigint(20) UNSIGNED NOT NULL,
  `quantity_done` decimal(12,2) NOT NULL,
  `completed_at` datetime NOT NULL,
  `completed_by` bigint(20) UNSIGNED NOT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `project_other_completions`
--

INSERT INTO `project_other_completions` (`id`, `project_id`, `project_planned_work_id`, `quantity_done`, `completed_at`, `completed_by`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, 2, 1.00, '2026-05-17 13:00:16', 1, 'Eski sistemden taşındı', '2026-05-17 11:42:25', '2026-05-17 11:42:25'),
(2, 1, 3, 1.00, '2026-05-17 13:03:44', 1, 'Eski sistemden taşındı', '2026-05-17 11:42:25', '2026-05-17 11:42:25');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_personnel`
--

CREATE TABLE `project_personnel` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_planned_geophysics`
--

CREATE TABLE `project_planned_geophysics` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `project_planned_geophysics`
--

INSERT INTO `project_planned_geophysics` (`id`, `project_id`, `measurement_type`, `planned_count`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, 'Masw Ölçü Alınması', 1, '{\"serviceItemName\":\"Masw Ölçü Alınması\",\"unit\":\"adet\"}', '2026-05-17 09:23:27', '2026-05-17 09:23:27');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_planned_wells`
--

CREATE TABLE `project_planned_wells` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `project_planned_wells`
--

INSERT INTO `project_planned_wells` (`id`, `project_id`, `well_number`, `planned_depth`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, 'SK-01', NULL, NULL, '2026-05-17 08:12:42', '2026-05-17 08:12:42'),
(2, 1, 'SK-02', NULL, NULL, '2026-05-17 08:12:42', '2026-05-17 08:12:42'),
(3, 1, 'SK-03', NULL, NULL, '2026-05-17 08:12:42', '2026-05-17 08:12:42');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_planned_works`
--

CREATE TABLE `project_planned_works` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `proposal_item_id` bigint(20) UNSIGNED DEFAULT NULL,
  `service_item_id` bigint(20) UNSIGNED DEFAULT NULL,
  `description` varchar(255) NOT NULL,
  `unit` varchar(255) DEFAULT NULL,
  `quantity` decimal(12,2) NOT NULL DEFAULT 0.00,
  `unit_price` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_price` decimal(14,2) NOT NULL DEFAULT 0.00,
  `completed_quantity` decimal(12,2) NOT NULL DEFAULT 0.00,
  `completed_at` timestamp NULL DEFAULT NULL,
  `completed_by` bigint(20) UNSIGNED DEFAULT NULL,
  `status` enum('bekliyor','devam_ediyor','tamamlandi','iptal') NOT NULL DEFAULT 'bekliyor',
  `notes` text DEFAULT NULL,
  `sort_order` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `sondaj_count` smallint(5) UNSIGNED DEFAULT NULL,
  `sondaj_depth` decimal(7,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `project_planned_works`
--

INSERT INTO `project_planned_works` (`id`, `project_id`, `proposal_item_id`, `service_item_id`, `description`, `unit`, `quantity`, `unit_price`, `total_price`, `completed_quantity`, `completed_at`, `completed_by`, `status`, `notes`, `sort_order`, `sondaj_count`, `sondaj_depth`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, '', 'adet', 3.00, 15000.00, 45000.00, 0.00, NULL, NULL, 'bekliyor', NULL, 0, 3, NULL, '2026-05-17 08:12:42', '2026-05-17 08:12:42'),
(2, 1, 2, 2, 'Jeolojik-Jeofizik Zemin Etüt Raporu Hazırlanması', 'adet', 2.00, 10000.00, 20000.00, 1.00, NULL, NULL, 'devam_ediyor', NULL, 1, NULL, NULL, '2026-05-17 08:12:42', '2026-05-17 11:51:52'),
(3, 1, NULL, 3, '', 'adet', 2.00, 0.00, 0.00, 1.00, NULL, NULL, 'devam_ediyor', NULL, 100, NULL, NULL, '2026-05-17 09:22:41', '2026-05-17 10:03:44');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_progress_components`
--

CREATE TABLE `project_progress_components` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `slug` varchar(255) NOT NULL,
  `label` varchar(255) NOT NULL,
  `weight_pct` tinyint(3) UNSIGNED NOT NULL DEFAULT 33,
  `linked_category` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `project_progress_components`
--

INSERT INTO `project_progress_components` (`id`, `slug`, `label`, `weight_pct`, `linked_category`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'sondaj', 'Sondaj', 40, 'sondaj', 1, 1, '2026-05-16 17:17:00', '2026-05-16 17:17:00'),
(2, 'jeofizik', 'Jeofizik', 30, 'jeofizik', 1, 2, '2026-05-16 17:17:00', '2026-05-16 17:17:00'),
(3, 'arazi_deneyleri', 'Arazi Deneyleri', 30, 'arazi_deneyleri', 1, 3, '2026-05-16 17:17:00', '2026-05-16 17:17:00');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_teams`
--

CREATE TABLE `project_teams` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `project_vehicles`
--

CREATE TABLE `project_vehicles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposals`
--

CREATE TABLE `proposals` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `proposal_number` varchar(255) NOT NULL,
  `contact_id` bigint(20) UNSIGNED DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `purpose` varchar(200) DEFAULT NULL,
  `property_owner` varchar(200) DEFAULT NULL,
  `requester_work_type` varchar(100) DEFAULT NULL,
  `is_public_work` tinyint(1) NOT NULL DEFAULT 0,
  `reference` text DEFAULT NULL,
  `supervising_authority` text DEFAULT NULL,
  `inspector_notes` text DEFAULT NULL,
  `site_access_notes` text DEFAULT NULL,
  `geological_info` text DEFAULT NULL,
  `isg_requirements` text DEFAULT NULL,
  `drilling_machine_type` varchar(100) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `field_work_days` int(11) DEFAULT NULL,
  `total_work_days` int(11) DEFAULT NULL,
  `daily_delay_fee` varchar(100) DEFAULT NULL,
  `prepared_by_name` varchar(200) DEFAULT NULL,
  `project_name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(30) NOT NULL DEFAULT 'talep',
  `requested_at` date DEFAULT NULL,
  `survey_date` date DEFAULT NULL,
  `survey_notes` text DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `district` varchar(100) DEFAULT NULL,
  `neighborhood` varchar(100) DEFAULT NULL,
  `pafta` varchar(100) DEFAULT NULL,
  `ada` varchar(50) DEFAULT NULL,
  `parcel` varchar(50) DEFAULT NULL,
  `area_m2` decimal(12,2) DEFAULT NULL,
  `latitude` decimal(10,7) DEFAULT NULL,
  `longitude` decimal(10,7) 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,
  `discount_type` varchar(10) DEFAULT NULL,
  `discount_value` decimal(12,2) DEFAULT NULL,
  `subcontractor_cost` decimal(15,2) DEFAULT NULL,
  `payment_plan_note` text DEFAULT NULL,
  `bank_account_info` varchar(500) 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,
  `parent_proposal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `revision_number` tinyint(3) UNSIGNED DEFAULT NULL,
  `revision_count` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `subcontractor_id` bigint(20) UNSIGNED DEFAULT NULL,
  `job_type` varchar(20) DEFAULT NULL,
  `urgency` varchar(30) DEFAULT 'Normal',
  `offer_file_no` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `proposals`
--

INSERT INTO `proposals` (`id`, `proposal_number`, `contact_id`, `title`, `purpose`, `property_owner`, `requester_work_type`, `is_public_work`, `reference`, `supervising_authority`, `inspector_notes`, `site_access_notes`, `geological_info`, `isg_requirements`, `drilling_machine_type`, `start_date`, `field_work_days`, `total_work_days`, `daily_delay_fee`, `prepared_by_name`, `project_name`, `description`, `status`, `requested_at`, `survey_date`, `survey_notes`, `city`, `district`, `neighborhood`, `pafta`, `ada`, `parcel`, `area_m2`, `latitude`, `longitude`, `submitted_at`, `approved_at`, `rejected_at`, `rejection_reason`, `total_amount`, `discount_type`, `discount_value`, `subcontractor_cost`, `payment_plan_note`, `bank_account_info`, `currency`, `validity_days`, `prepared_by`, `approved_by`, `project_id`, `parent_proposal_id`, `revision_number`, `revision_count`, `created_at`, `updated_at`, `subcontractor_id`, `job_type`, `urgency`, `offer_file_no`) VALUES
(1, 'TKL_260001', 1, 'test', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Şahin KESKİN', NULL, NULL, 'proje_oldu', '2026-05-17', NULL, NULL, 'Kocaeli', 'Gölcük', 'Ş.Değirmendere Köyü', '20J3', '199', '3', 404.00, 40.7181140, 29.7857200, '2026-05-17', '2026-05-17', NULL, NULL, 55000.00, NULL, NULL, NULL, NULL, NULL, 'TRY', 15, 1, 1, 1, NULL, NULL, 0, '2026-05-17 08:10:04', '2026-05-17 08:12:42', NULL, 'proje', 'Normal', NULL);

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_documents`
--

CREATE TABLE `proposal_documents` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_items`
--

CREATE TABLE `proposal_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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,6) NOT NULL DEFAULT 0.000000,
  `discount_type` varchar(10) DEFAULT NULL,
  `discount_value` decimal(12,2) DEFAULT NULL,
  `total_price` decimal(15,2) NOT NULL DEFAULT 0.00,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `sondaj_count` smallint(5) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `service_item_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `proposal_items`
--

INSERT INTO `proposal_items` (`id`, `proposal_id`, `description`, `unit`, `quantity`, `unit_price`, `discount_type`, `discount_value`, `total_price`, `sort_order`, `sondaj_count`, `created_at`, `updated_at`, `service_item_id`) VALUES
(1, 1, '', 'adet', 3.00, 15000.000000, 'percent', 0.00, 45000.00, 0, 3, '2026-05-17 08:12:21', '2026-05-17 08:12:21', 1),
(2, 1, '', 'adet', 1.00, 10000.000000, 'percent', 0.00, 10000.00, 1, NULL, '2026-05-17 08:12:31', '2026-05-17 08:12:31', 2);

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_payment_item_templates`
--

CREATE TABLE `proposal_payment_item_templates` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `phase` enum('saha','lab') NOT NULL,
  `description` varchar(500) NOT NULL,
  `usage_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `proposal_payment_item_templates`
--

INSERT INTO `proposal_payment_item_templates` (`id`, `phase`, `description`, `usage_count`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'saha', 'Mobilizasyon', 1, 1, 1, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(2, 'saha', 'Mobilizasyon yapılınca', 1, 1, 2, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(3, 'saha', 'Arazi ekipler ulaşıp işe başlayınca', 1, 1, 3, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(4, 'saha', 'Arazi çalışmaları esnasında ara hakediş', 1, 1, 4, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(5, 'saha', 'Arazi çalışmaları bitince', 1, 1, 5, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(6, 'lab', 'Laboratuvar çalışmaları esnasında', 1, 1, 6, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(7, 'lab', 'Zemin etüt veri rapor bitince', 1, 1, 7, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(8, 'lab', 'Zemin etüt jeoteknik raporu bitince', 1, 1, 8, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(9, 'lab', 'Ruhsat yazılıp imzaya açılınca', 1, 1, 9, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(10, 'lab', 'Kamu işi ise hakediş alınınca', 1, 1, 10, '2026-05-16 17:17:15', '2026-05-17 08:10:06');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_payment_plan_items`
--

CREATE TABLE `proposal_payment_plan_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `proposal_id` bigint(20) UNSIGNED NOT NULL,
  `phase` enum('saha','lab') NOT NULL,
  `description` varchar(255) NOT NULL,
  `percentage` decimal(5,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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `proposal_payment_plan_items`
--

INSERT INTO `proposal_payment_plan_items` (`id`, `proposal_id`, `phase`, `description`, `percentage`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 1, 'saha', 'Mobilizasyon', 0.00, 0, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(2, 1, 'saha', 'Mobilizasyon yapılınca', 0.00, 1, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(3, 1, 'saha', 'Arazi ekipler ulaşıp işe başlayınca', 0.00, 2, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(4, 1, 'saha', 'Arazi çalışmaları esnasında ara hakediş', 0.00, 3, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(5, 1, 'saha', 'Arazi çalışmaları bitince', 0.00, 4, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(6, 1, 'lab', 'Laboratuvar çalışmaları esnasında', 0.00, 5, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(7, 1, 'lab', 'Zemin etüt veri rapor bitince', 0.00, 6, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(8, 1, 'lab', 'Zemin etüt jeoteknik raporu bitince', 0.00, 7, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(9, 1, 'lab', 'Ruhsat yazılıp imzaya açılınca', 0.00, 8, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(10, 1, 'lab', 'Kamu işi ise hakediş alınınca', 0.00, 9, '2026-05-17 08:10:06', '2026-05-17 08:10:06');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_responsibilities`
--

CREATE TABLE `proposal_responsibilities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `proposal_id` bigint(20) UNSIGNED NOT NULL,
  `description` varchar(255) NOT NULL,
  `responsible_party` enum('yok','yuklenici','isveren') NOT NULL DEFAULT 'yuklenici',
  `special_notes` varchar(500) DEFAULT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `proposal_responsibilities`
--

INSERT INTO `proposal_responsibilities` (`id`, `proposal_id`, `description`, `responsible_party`, `special_notes`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 1, 'Sahada Jeoloji-JeofizikMühendislik hizmetleri', 'yok', NULL, 0, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(2, 1, 'Arazi içi Sondaj noktasına ulaşım için gerekli hafriyat,yol açılması', 'yok', NULL, 1, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(3, 1, 'Sondaj suyunun bulunması yada su alınması', 'yok', NULL, 2, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(4, 1, 'Sondaj delgi için gerekli olan devirdaim suyunun makinanın yanına taşınması yada hortumla su alınması', 'yok', NULL, 3, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(5, 1, 'Altyapı sorgulamavesondaj noktası belirleme', 'yok', NULL, 4, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(6, 1, 'İhtiyaç halinde harita mühendisliği, koordinatlamarögerleme işleri', 'yok', NULL, 5, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(7, 1, 'Sondaj kuyusuna 50 mm pimaç koymak. YASS su seviye ölçümü ve/veyakuyu derinliği ölçmek için', 'yok', NULL, 6, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(8, 1, 'Numune Karot sandığı-4gözlü HQ tipi', 'yok', NULL, 7, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(9, 1, 'Kuyu ağzı betonu ve kapak-korlapta', 'yok', NULL, 8, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(10, 1, 'Sondaj logu hazırlanması', 'yok', NULL, 9, '2026-05-17 08:10:06', '2026-05-17 08:10:06'),
(11, 1, 'Çalışma fotoları ve karot sandık fotoları çekilmesi', 'yok', NULL, 10, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(12, 1, 'Kuyu sonu videoMedolar çekilmesi', 'yok', NULL, 11, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(13, 1, 'SPT/ UD videoları çekilmesi', 'yok', NULL, 12, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(14, 1, 'SismikResistivite,Mikrotremör Videoları çekilmesi', 'yok', NULL, 13, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(15, 1, 'Pressiyometre deney videoları çekilmesi', 'yok', NULL, 14, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(16, 1, 'Sondaj bitince işareti-Sondaj numarası sonrasında geliri silinir', 'yok', NULL, 15, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(17, 1, 'Sondaj devirdarim çukuru kapatılması ıslah edilmesi', 'yok', NULL, 16, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(18, 1, 'Gerekli mercilerden çalışma ve araç nakil izinlerinin alınması', 'yok', NULL, 17, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(19, 1, 'İase', 'yok', NULL, 18, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(20, 1, 'Banınma', 'yok', NULL, 19, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(21, 1, 'Çıkabilecek her tür harç aidat vs.', 'yok', NULL, 20, '2026-05-17 08:10:07', '2026-05-17 08:10:07'),
(22, 1, 'Üniversite Onayı', 'yok', NULL, 21, '2026-05-17 08:10:07', '2026-05-17 08:10:07');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_responsibility_templates`
--

CREATE TABLE `proposal_responsibility_templates` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `description` varchar(500) NOT NULL,
  `usage_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `proposal_responsibility_templates`
--

INSERT INTO `proposal_responsibility_templates` (`id`, `description`, `usage_count`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'Sahada Jeoloji-JeofizikMühendislik hizmetleri', 1, 1, 1, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(2, 'Arazi içi Sondaj noktasına ulaşım için gerekli hafriyat,yol açılması', 1, 1, 2, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(3, 'Sondaj suyunun bulunması yada su alınması', 1, 1, 3, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(4, 'Sondaj delgi için gerekli olan devirdaim suyunun makinanın yanına taşınması yada hortumla su alınması', 1, 1, 4, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(5, 'Altyapı sorgulamavesondaj noktası belirleme', 1, 1, 5, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(6, 'İhtiyaç halinde harita mühendisliği, koordinatlamarögerleme işleri', 1, 1, 6, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(7, 'Sondaj kuyusuna 50 mm pimaç koymak. YASS su seviye ölçümü ve/veyakuyu derinliği ölçmek için', 1, 1, 7, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(8, 'Numune Karot sandığı-4gözlü HQ tipi', 1, 1, 8, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(9, 'Kuyu ağzı betonu ve kapak-korlapta', 1, 1, 9, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(10, 'Sondaj logu hazırlanması', 1, 1, 10, '2026-05-16 17:17:15', '2026-05-17 08:10:06'),
(11, 'Çalışma fotoları ve karot sandık fotoları çekilmesi', 1, 1, 11, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(12, 'Kuyu sonu videoMedolar çekilmesi', 1, 1, 12, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(13, 'SPT/ UD videoları çekilmesi', 1, 1, 13, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(14, 'SismikResistivite,Mikrotremör Videoları çekilmesi', 1, 1, 14, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(15, 'Pressiyometre deney videoları çekilmesi', 1, 1, 15, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(16, 'Sondaj bitince işareti-Sondaj numarası sonrasında geliri silinir', 1, 1, 16, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(17, 'Sondaj devirdarim çukuru kapatılması ıslah edilmesi', 1, 1, 17, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(18, 'Gerekli mercilerden çalışma ve araç nakil izinlerinin alınması', 1, 1, 18, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(19, 'İase', 1, 1, 19, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(20, 'Banınma', 1, 1, 20, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(21, 'Çıkabilecek her tür harç aidat vs.', 1, 1, 21, '2026-05-16 17:17:15', '2026-05-17 08:10:07'),
(22, 'Üniversite Onayı', 1, 1, 22, '2026-05-16 17:17:15', '2026-05-17 08:10:07');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_revisions`
--

CREATE TABLE `proposal_revisions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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`)),
  `items_snapshot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items_snapshot`)),
  `notes` text DEFAULT NULL,
  `revised_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_subcontractor_quotes`
--

CREATE TABLE `proposal_subcontractor_quotes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `proposal_id` bigint(20) UNSIGNED NOT NULL,
  `contact_id` bigint(20) UNSIGNED NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'bekliyor',
  `total_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `discount_type` varchar(10) DEFAULT NULL,
  `discount_value` decimal(12,2) 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_subcontractor_quote_items`
--

CREATE TABLE `proposal_subcontractor_quote_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `quote_id` bigint(20) UNSIGNED NOT NULL,
  `service_item_id` bigint(20) UNSIGNED DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `unit` varchar(20) DEFAULT NULL,
  `sondaj_count` int(10) UNSIGNED DEFAULT NULL,
  `quantity` decimal(12,2) NOT NULL DEFAULT 1.00,
  `unit_price` decimal(15,6) NOT NULL DEFAULT 0.000000,
  `discount_type` varchar(10) DEFAULT NULL,
  `discount_value` decimal(12,2) DEFAULT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_templates`
--

CREATE TABLE `proposal_templates` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` varchar(7) NOT NULL DEFAULT '#3b82f6',
  `icon` varchar(10) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `usage_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_template_items`
--

CREATE TABLE `proposal_template_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `proposal_template_id` bigint(20) UNSIGNED NOT NULL,
  `service_item_id` bigint(20) UNSIGNED DEFAULT NULL,
  `description` varchar(500) DEFAULT 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,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_template_payment_items`
--

CREATE TABLE `proposal_template_payment_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `proposal_template_id` bigint(20) UNSIGNED NOT NULL,
  `phase` enum('saha','lab') NOT NULL,
  `description` varchar(500) NOT NULL,
  `percentage` decimal(5,2) NOT NULL DEFAULT 0.00,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `proposal_template_responsibilities`
--

CREATE TABLE `proposal_template_responsibilities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `proposal_template_id` bigint(20) UNSIGNED NOT NULL,
  `description` varchar(500) NOT NULL,
  `responsible_party` enum('yok','yuklenici','isveren') NOT NULL DEFAULT 'yuklenici',
  `special_notes` varchar(500) DEFAULT NULL,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `purchase_orders`
--

CREATE TABLE `purchase_orders` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `purchase_order_items`
--

CREATE TABLE `purchase_order_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `purchase_requests`
--

CREATE TABLE `purchase_requests` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `purchase_request_items`
--

CREATE TABLE `purchase_request_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `push_subscriptions`
--

CREATE TABLE `push_subscriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `endpoint` text NOT NULL,
  `p256dh` text NOT NULL,
  `auth_key` text NOT NULL,
  `user_agent` text DEFAULT NULL,
  `device_name` varchar(120) DEFAULT NULL,
  `subscribed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `roles`
--

INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(2, 'Misafir', 'web', '2026-05-16 17:17:13', '2026-05-16 17:17:13');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `role_has_permissions`
--

INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
(3, 1),
(4, 1),
(5, 1),
(6, 1),
(7, 1),
(8, 1),
(9, 1),
(10, 1),
(11, 1),
(12, 1),
(13, 1),
(14, 1),
(15, 1),
(16, 1),
(17, 1),
(18, 1),
(19, 1),
(20, 1),
(21, 1),
(22, 1),
(23, 1),
(24, 1),
(25, 1),
(26, 1),
(27, 1),
(28, 1),
(29, 1),
(30, 1),
(31, 1),
(32, 1),
(33, 1),
(34, 1),
(35, 1),
(36, 1),
(37, 1),
(38, 1),
(39, 1),
(40, 1),
(41, 1),
(42, 1),
(43, 1),
(44, 1),
(45, 1),
(46, 1),
(47, 1),
(48, 1),
(49, 1),
(50, 1),
(51, 1),
(52, 1),
(53, 1),
(54, 1),
(55, 1),
(56, 1),
(57, 1),
(58, 1),
(59, 1),
(60, 1),
(61, 1),
(62, 1),
(63, 1),
(64, 1),
(65, 1),
(66, 1);

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `service_categories`
--

CREATE TABLE `service_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(50) NOT NULL,
  `color` varchar(20) NOT NULL DEFAULT '#6b7280',
  `numbering_module` varchar(50) DEFAULT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `service_categories`
--

INSERT INTO `service_categories` (`id`, `name`, `slug`, `color`, `numbering_module`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'Sondaj', 'sondaj', '#3b82f6', 'svc_sondaj', 1, '2026-05-16 17:16:54', '2026-05-16 17:16:54'),
(2, 'Jeofizik', 'jeofizik', '#f59e0b', 'svc_jeofizik', 2, '2026-05-16 17:16:54', '2026-05-17 10:22:52'),
(3, 'Arazi Deneyleri', 'arazi_deneyleri', '#10b981', 'svc_arazi_deneyleri', 3, '2026-05-16 17:16:54', '2026-05-16 17:16:54'),
(4, 'Diğer', 'diger', '#6b7280', 'svc_diger', 4, '2026-05-16 17:16:54', '2026-05-17 10:21:18');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `service_items`
--

CREATE TABLE `service_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `category` enum('sondaj','jeofizik','arazi_deneyleri','diger') NOT NULL DEFAULT 'diger',
  `unit` varchar(50) NOT NULL,
  `has_metraj` tinyint(1) NOT NULL DEFAULT 0,
  `unit_price` decimal(12,2) NOT NULL DEFAULT 0.00,
  `kdv_rate` decimal(5,2) NOT NULL DEFAULT 20.00,
  `description` text DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `service_category_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `service_items`
--

INSERT INTO `service_items` (`id`, `code`, `name`, `category`, `unit`, `has_metraj`, `unit_price`, `kdv_rate`, `description`, `is_active`, `created_at`, `updated_at`, `service_category_id`) VALUES
(1, 'SND_0001', 'Her Cins Zeminde Sondaj Yapılması İşi', 'sondaj', 'adet', 1, 0.00, 20.00, NULL, 1, '2026-05-17 08:11:10', '2026-05-17 08:11:10', 1),
(2, 'DGR_0001', 'Jeolojik-Jeofizik Zemin Etüt Raporu Hazırlanması', 'diger', 'adet', 0, 0.00, 20.00, NULL, 1, '2026-05-17 08:11:59', '2026-05-17 08:11:59', 4),
(3, 'DGR_0002', 'Geoteknik Rapor Hazırlanması', 'diger', 'adet', 0, 0.00, 20.00, NULL, 1, '2026-05-17 09:22:31', '2026-05-17 09:22:31', 4),
(4, 'JFZ_0001', 'Masw Ölçü Alınması', 'jeofizik', 'adet', 0, 0.00, 20.00, NULL, 1, '2026-05-17 09:23:19', '2026-05-17 09:23:19', 2);

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `sessions`
--

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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('nkNZ6uImz4qQGGoZUe1Q3o8vbrXPeort0Rd2TXti', 1, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', 'YTo2OntzOjY6Il90b2tlbiI7czo0MDoiaDM4enRsNG9FY214YjNJZ2QzV2pZdU1OT3g1SjVMU3R0Z3dQRm4xTyI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czozOiJ1cmwiO2E6MDp7fXM6OToiX3ByZXZpb3VzIjthOjI6e3M6MzoidXJsIjtzOjQ3OiJodHRwOi8vbG9jYWxob3N0L3BhbmVsX2tlc2thL3B1YmxpYy9hZG1pbi9yb2xlcyI7czo1OiJyb3V0ZSI7czoxNzoiYWRtaW4ucm9sZXMuaW5kZXgiO31zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToxO3M6MTQ6ImN1cnJlbnRfbW9kdWxlIjtzOjEwOiJldHV0X3Byb2plIjt9', 1779021006);

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `settings`
--

CREATE TABLE `settings` (
  `key` varchar(255) NOT NULL,
  `value` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `settings`
--

INSERT INTO `settings` (`key`, `value`, `created_at`, `updated_at`) VALUES
('contact_number_padding', '4', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('contact_prefix', 'RHB', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('contact_separator', '-', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('contact_year_based', '0', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('device_number_padding', '4', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('device_prefix', 'CHZ', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('device_separator', '_', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('device_year_based', '0', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('device_year_format', 'full_sep', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('expert_report_number_padding', '4', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('expert_report_prefix', 'EKS', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('expert_report_separator', '_', '2026-05-16 17:17:08', '2026-05-16 17:17:11'),
('expert_report_year_based', '0', '2026-05-16 17:17:08', '2026-05-16 17:17:11'),
('expert_report_year_format', 'full_sep', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('fatura_af_number_padding', '4', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_af_prefix', 'FTA', '2026-05-16 17:17:08', '2026-05-17 08:09:22'),
('fatura_af_separator', '_', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_af_year_based', '1', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_af_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('fatura_aif_number_padding', '4', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_aif_prefix', 'FAI', '2026-05-16 17:17:08', '2026-05-17 08:09:22'),
('fatura_aif_separator', '_', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_aif_year_based', '1', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_aif_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('fatura_sf_number_padding', '4', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_sf_prefix', 'FTS', '2026-05-16 17:17:08', '2026-05-17 08:09:22'),
('fatura_sf_separator', '_', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_sf_year_based', '1', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_sf_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('fatura_sif_number_padding', '4', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_sif_prefix', 'FSI', '2026-05-16 17:17:08', '2026-05-17 08:09:22'),
('fatura_sif_separator', '_', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_sif_year_based', '1', '2026-05-16 17:17:08', '2026-05-16 17:17:10'),
('fatura_sif_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('field_work_log_number_padding', '4', '2026-05-16 17:17:09', '2026-05-16 17:17:09'),
('field_work_log_prefix', 'SCG', '2026-05-16 17:17:09', '2026-05-17 08:09:22'),
('field_work_log_separator', '_', '2026-05-16 17:17:09', '2026-05-16 17:17:11'),
('field_work_log_year_based', '1', '2026-05-16 17:17:09', '2026-05-17 08:09:22'),
('field_work_log_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('hakedis_number_padding', '5', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('hakedis_prefix', 'HKD', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('hakedis_separator', '-', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('hakedis_year_based', '1', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('jeofizik_plan_number_padding', '4', '2026-05-16 17:17:09', '2026-05-16 17:17:09'),
('jeofizik_plan_prefix', 'JSP', '2026-05-16 17:17:09', '2026-05-17 08:09:22'),
('jeofizik_plan_separator', '_', '2026-05-16 17:17:09', '2026-05-16 17:17:11'),
('jeofizik_plan_year_based', '1', '2026-05-16 17:17:09', '2026-05-17 08:09:22'),
('jeofizik_plan_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('machine_number_padding', '4', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('machine_prefix', 'MKN', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('machine_separator', '_', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('machine_year_based', '0', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('machine_year_format', 'full_sep', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('maintenance_number_padding', '4', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('maintenance_prefix', 'BKM', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('maintenance_separator', '_', '2026-05-16 17:17:08', '2026-05-16 17:17:11'),
('maintenance_year_based', '0', '2026-05-16 17:17:08', '2026-05-16 17:17:11'),
('maintenance_year_format', 'full_sep', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('musteri_hakedis_number_padding', '4', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('musteri_hakedis_prefix', 'MHK', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('musteri_hakedis_separator', '_', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('musteri_hakedis_year_based', '1', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('musteri_hakedis_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('musteri_number_padding', '4', '2026-05-16 17:16:55', '2026-05-16 17:16:55'),
('musteri_prefix', 'MST', '2026-05-16 17:16:55', '2026-05-16 17:16:55'),
('musteri_separator', '_', '2026-05-16 17:16:55', '2026-05-16 17:17:10'),
('musteri_siparis_number_padding', '4', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('musteri_siparis_prefix', 'MSP', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('musteri_siparis_separator', '_', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('musteri_siparis_year_based', '1', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('musteri_siparis_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('musteri_year_based', '0', '2026-05-16 17:16:55', '2026-05-16 17:17:10'),
('musteri_year_format', 'full_sep', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('personnel_number_padding', '4', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('personnel_prefix', 'PRS', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('personnel_separator', '_', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('personnel_year_based', '0', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('personnel_year_format', 'full_sep', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('poi_number_padding', '4', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('poi_prefix', 'HKG', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('poi_separator', '_', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('poi_year_based', '0', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('poi_year_format', 'full_sep', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('progress_log_lab_max', '85', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('progress_milestone_label_log_lab', 'Log/Lab', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('progress_status_log_lab_asamasi', '85', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('progress_status_onay_asamasi', '95', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('progress_status_raporlama_asamasi', '85', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('progress_status_saha_calismalari', '65', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('progress_status_tamamlandi', '100', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('project_number_padding', '4', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('project_padding', '5', '2026-05-16 17:16:48', '2026-05-16 17:16:48'),
('project_prefix', 'PRJ', '2026-05-16 17:16:48', '2026-05-16 17:17:10'),
('project_separator', '_', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('project_year_based', '1', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('project_year_format', 'short_glue', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('proposal_number_padding', '4', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('proposal_prefix', 'TKL', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('proposal_separator', '_', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('proposal_year_based', '1', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('proposal_year_format', 'short_glue', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('purchase_order_number_padding', '4', '2026-05-16 17:17:09', '2026-05-16 17:17:09'),
('purchase_order_prefix', 'SAS', '2026-05-16 17:17:09', '2026-05-17 08:09:22'),
('purchase_order_separator', '_', '2026-05-16 17:17:09', '2026-05-16 17:17:11'),
('purchase_order_year_based', '1', '2026-05-16 17:17:09', '2026-05-17 08:09:22'),
('purchase_order_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('purchase_request_number_padding', '4', '2026-05-16 17:17:09', '2026-05-16 17:17:09'),
('purchase_request_prefix', 'SAT', '2026-05-16 17:17:08', '2026-05-17 08:09:22'),
('purchase_request_separator', '_', '2026-05-16 17:17:09', '2026-05-16 17:17:11'),
('purchase_request_year_based', '1', '2026-05-16 17:17:09', '2026-05-17 08:09:22'),
('purchase_request_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('siparis_number_padding', '5', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('siparis_prefix', 'SIP', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('siparis_separator', '-', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('siparis_year_based', '1', '2026-05-16 17:17:08', '2026-05-16 17:17:08'),
('sondaj_plan_number_padding', '4', '2026-05-16 17:17:09', '2026-05-16 17:17:09'),
('sondaj_plan_prefix', 'SSP', '2026-05-16 17:17:09', '2026-05-17 08:09:22'),
('sondaj_plan_separator', '_', '2026-05-16 17:17:09', '2026-05-16 17:17:11'),
('sondaj_plan_year_based', '1', '2026-05-16 17:17:09', '2026-05-17 08:09:22'),
('sondaj_plan_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('svc_arazi_deneyleri_number_padding', '4', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('svc_arazi_deneyleri_prefix', 'ARD', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('svc_arazi_deneyleri_separator', '_', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('svc_arazi_deneyleri_year_based', '0', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('svc_arazi_deneyleri_year_format', 'full_sep', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('svc_diger_number_padding', '4', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('svc_diger_prefix', 'DGR', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('svc_diger_separator', '_', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('svc_diger_year_based', '0', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('svc_diger_year_format', 'full_sep', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('svc_jeofizik_number_padding', '4', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('svc_jeofizik_prefix', 'JFZ', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('svc_jeofizik_separator', '_', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('svc_jeofizik_year_based', '0', '2026-05-16 17:17:11', '2026-05-16 17:17:11'),
('svc_jeofizik_year_format', 'full_sep', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('svc_sondaj_number_padding', '4', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('svc_sondaj_prefix', 'SND', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('svc_sondaj_separator', '_', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('svc_sondaj_year_based', '0', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('svc_sondaj_year_format', 'full_sep', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('tedarikci_hakedis_number_padding', '4', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('tedarikci_hakedis_prefix', 'THK', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('tedarikci_hakedis_separator', '_', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('tedarikci_hakedis_year_based', '1', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('tedarikci_hakedis_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('tedarikci_number_padding', '4', '2026-05-16 17:16:55', '2026-05-16 17:16:55'),
('tedarikci_prefix', 'TDR', '2026-05-16 17:16:55', '2026-05-16 17:16:55'),
('tedarikci_separator', '_', '2026-05-16 17:16:55', '2026-05-16 17:17:10'),
('tedarikci_siparis_number_padding', '4', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('tedarikci_siparis_prefix', 'TSP', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('tedarikci_siparis_separator', '_', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('tedarikci_siparis_year_based', '1', '2026-05-16 17:17:10', '2026-05-16 17:17:10'),
('tedarikci_siparis_year_format', 'short_glue', '2026-05-17 08:09:22', '2026-05-17 08:09:22'),
('tedarikci_year_based', '0', '2026-05-16 17:16:55', '2026-05-16 17:17:10'),
('tedarikci_year_format', 'full_sep', '2026-05-17 08:09:21', '2026-05-17 08:09:21'),
('vehicle_number_padding', '4', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('vehicle_prefix', 'ARC', '2026-05-16 17:16:52', '2026-05-16 17:16:52'),
('vehicle_separator', '_', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('vehicle_year_based', '0', '2026-05-16 17:16:52', '2026-05-16 17:17:10'),
('vehicle_year_format', 'full_sep', '2026-05-17 08:09:21', '2026-05-17 08:09:21');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `siparisler`
--

CREATE TABLE `siparisler` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `siparis_no` varchar(255) NOT NULL,
  `tip` varchar(20) NOT NULL DEFAULT 'musteri',
  `contact_id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED DEFAULT NULL,
  `proposal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `subcontractor_quote_id` bigint(20) UNSIGNED DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `order_date` date NOT NULL,
  `total_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `status` varchar(255) NOT NULL DEFAULT 'aktif',
  `description` text DEFAULT NULL,
  `close_reason` varchar(50) DEFAULT NULL,
  `close_note` varchar(255) DEFAULT NULL,
  `closed_at` timestamp NULL DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `siparisler`
--

INSERT INTO `siparisler` (`id`, `siparis_no`, `tip`, `contact_id`, `project_id`, `proposal_id`, `subcontractor_quote_id`, `title`, `order_date`, `total_amount`, `status`, `description`, `close_reason`, `close_note`, `closed_at`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'MSP_260001', 'musteri', 1, 1, 1, NULL, 'test', '2026-05-17', 75000.00, 'aktif', 'TKL_260001 teklifinden PRJ_260001 projesine dönüştürüldü.', NULL, NULL, NULL, 1, '2026-05-17 08:12:42', '2026-05-17 10:04:00');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `siparis_kalemleri`
--

CREATE TABLE `siparis_kalemleri` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `siparis_id` bigint(20) UNSIGNED NOT NULL,
  `proposal_item_id` bigint(20) UNSIGNED DEFAULT NULL,
  `service_item_id` bigint(20) UNSIGNED DEFAULT NULL,
  `item_code` varchar(60) DEFAULT NULL,
  `item_name` varchar(255) DEFAULT NULL,
  `category` varchar(60) DEFAULT NULL,
  `category_label` varchar(120) DEFAULT NULL,
  `description` varchar(255) NOT NULL,
  `unit` varchar(255) DEFAULT NULL,
  `quantity` decimal(15,3) NOT NULL DEFAULT 0.000,
  `sondaj_count` int(10) UNSIGNED DEFAULT NULL,
  `unit_price` decimal(15,2) NOT NULL DEFAULT 0.00,
  `kdv_rate` decimal(5,2) DEFAULT NULL,
  `total_price` decimal(15,2) NOT NULL DEFAULT 0.00,
  `notes` text DEFAULT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `status` varchar(20) NOT NULL DEFAULT 'aktif',
  `cancelled_at` timestamp NULL DEFAULT NULL,
  `cancelled_note` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `siparis_kalemleri`
--

INSERT INTO `siparis_kalemleri` (`id`, `siparis_id`, `proposal_item_id`, `service_item_id`, `item_code`, `item_name`, `category`, `category_label`, `description`, `unit`, `quantity`, `sondaj_count`, `unit_price`, `kdv_rate`, `total_price`, `notes`, `sort_order`, `status`, `cancelled_at`, `cancelled_note`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 'SND_0001', 'Her Cins Zeminde Sondaj Yapılması İşi', 'sondaj', 'Sondaj', '', 'adet', 3.000, 3, 15000.00, 20.00, 45000.00, NULL, 0, 'aktif', NULL, NULL, '2026-05-17 08:12:42', '2026-05-17 08:12:42'),
(2, 1, 2, 2, 'DGR_0001', 'Jeolojik-Jeofizik Zemin Etüt Raporu Hazırlanması', 'diger', 'Diğer', '', 'adet', 2.000, NULL, 10000.00, 20.00, 20000.00, NULL, 1, 'tamamlandi', NULL, NULL, '2026-05-17 08:12:42', '2026-05-17 09:52:40'),
(3, 1, NULL, 4, 'JFZ_0001', 'Masw Ölçü Alınması', 'jeofizik', 'Jeofizik', '', 'adet', 1.000, NULL, 0.00, 20.00, 0.00, NULL, 11, 'aktif', NULL, NULL, '2026-05-17 09:23:27', '2026-05-17 09:49:00'),
(4, 1, NULL, 3, 'DGR_0002', 'Geoteknik Rapor Hazırlanması', 'diger', 'Diğer', '', 'adet', 2.000, NULL, 5000.00, 20.00, 10000.00, NULL, 21, 'aktif', NULL, NULL, '2026-05-17 09:26:07', '2026-05-17 10:04:00');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `sondaj_field_plans`
--

CREATE TABLE `sondaj_field_plans` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `plan_number` varchar(30) DEFAULT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `scheduled_date` date NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'planlandı',
  `notes` text DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `sondaj_field_plan_personnel`
--

CREATE TABLE `sondaj_field_plan_personnel` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sondaj_field_plan_id` bigint(20) UNSIGNED NOT NULL,
  `personnel_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `sondaj_field_plan_vehicles`
--

CREATE TABLE `sondaj_field_plan_vehicles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sondaj_field_plan_id` bigint(20) UNSIGNED NOT NULL,
  `vehicle_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `sondaj_logs`
--

CREATE TABLE `sondaj_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `sondaj_no` varchar(50) NOT NULL,
  `toplam_derinlik` decimal(8,2) DEFAULT NULL,
  `baslangic_tarihi` date DEFAULT NULL,
  `bitis_tarihi` date DEFAULT NULL,
  `makine_tipi_metot` varchar(255) DEFAULT NULL,
  `spt_sahmerdan_tipi` varchar(100) DEFAULT NULL,
  `delgi_capi` varchar(100) DEFAULT NULL,
  `enlem` varchar(30) DEFAULT NULL,
  `boylam` varchar(30) DEFAULT NULL,
  `pafta` varchar(100) DEFAULT NULL,
  `ada_parsel` varchar(100) DEFAULT NULL,
  `sondaj_kotu` decimal(8,2) DEFAULT NULL,
  `yalti_suyu_derinligi` varchar(50) DEFAULT NULL,
  `yass_entries` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`yass_entries`)),
  `sorumlu_muhendis` varchar(255) DEFAULT NULL,
  `sondor_adsoyad` varchar(255) DEFAULT NULL,
  `sondor_belge_no` varchar(100) DEFAULT NULL,
  `isseven` varchar(255) DEFAULT NULL,
  `status` enum('taslak','gonderildi','onaylandi','reddedildi') NOT NULL DEFAULT 'taslak',
  `submitted_by` bigint(20) UNSIGNED NOT NULL,
  `reviewed_by` bigint(20) UNSIGNED DEFAULT NULL,
  `reviewed_at` timestamp NULL DEFAULT NULL,
  `rejection_reason` text DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `sondaj_log_lab_assignments`
--

CREATE TABLE `sondaj_log_lab_assignments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sondaj_log_id` bigint(20) UNSIGNED NOT NULL,
  `sondaj_log_row_id` bigint(20) UNSIGNED NOT NULL,
  `lab_firm_id` bigint(20) UNSIGNED NOT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `sondaj_log_lab_assignment_tests`
--

CREATE TABLE `sondaj_log_lab_assignment_tests` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sondaj_log_lab_assignment_id` bigint(20) UNSIGNED NOT NULL,
  `lab_test_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `sondaj_log_rows`
--

CREATE TABLE `sondaj_log_rows` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sondaj_log_id` bigint(20) UNSIGNED NOT NULL,
  `sira_no` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `derinlik_baslangic` decimal(7,2) NOT NULL,
  `derinlik_bitis` decimal(7,2) NOT NULL,
  `muhafaza_borusu_derinligi` decimal(7,2) DEFAULT NULL,
  `ornek_derinlik_baslangic` decimal(7,2) DEFAULT NULL,
  `ornek_derinlik_bitis` decimal(7,2) DEFAULT NULL,
  `ornek_turu` varchar(20) DEFAULT NULL,
  `ornek_no` varchar(30) DEFAULT NULL,
  `spt_0_15` varchar(10) DEFAULT NULL,
  `spt_15_30` varchar(10) DEFAULT NULL,
  `spt_30_45` varchar(10) DEFAULT NULL,
  `spt_n_aciklama` varchar(20) DEFAULT NULL,
  `presiyometre_elastisite` decimal(10,2) DEFAULT NULL,
  `presiyometre_limit_basinc` decimal(10,2) DEFAULT NULL,
  `tcr` decimal(5,1) DEFAULT NULL,
  `scr` decimal(5,1) DEFAULT NULL,
  `rqd` decimal(5,1) DEFAULT NULL,
  `ayrisma_derecesi` varchar(10) DEFAULT NULL,
  `catlak_sikligi` varchar(30) DEFAULT NULL,
  `dayanim` varchar(10) DEFAULT NULL,
  `zemin_tipi` varchar(20) DEFAULT NULL,
  `zemin_profili_svg` varchar(100) DEFAULT NULL,
  `zemin_tanimi` text DEFAULT NULL,
  `kuyu_sonu` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `subcontractor_quote_payment_items`
--

CREATE TABLE `subcontractor_quote_payment_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `quote_id` bigint(20) UNSIGNED NOT NULL,
  `phase` enum('saha','lab') NOT NULL,
  `description` varchar(255) NOT NULL,
  `percentage` decimal(5,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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `subcontractor_quote_responsibilities`
--

CREATE TABLE `subcontractor_quote_responsibilities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `quote_id` bigint(20) UNSIGNED NOT NULL,
  `description` varchar(255) NOT NULL,
  `responsible_party` enum('yok','yuklenici','isveren') NOT NULL DEFAULT 'yuklenici',
  `special_notes` varchar(500) DEFAULT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `subcontractor_responsibility_responses`
--

CREATE TABLE `subcontractor_responsibility_responses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `quote_id` bigint(20) UNSIGNED NOT NULL,
  `responsibility_id` bigint(20) UNSIGNED NOT NULL,
  `response` enum('kabul','red') NOT NULL DEFAULT 'kabul',
  `notes` varchar(500) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `teams`
--

CREATE TABLE `teams` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `teams`
--

INSERT INTO `teams` (`id`, `name`, `code`, `department_id`, `leader_id`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Keska 1', 'KESKA-1', NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(2, 'Keska 2', 'KESKA-2', NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(3, 'Keska 3', 'KESKA-3', NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(4, 'Keska 4', 'KESKA-4', NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(5, 'Keska 5', 'KESKA-5', NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(6, 'Bakım Ekibi', 'BAKIM', NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(7, 'Etüt Ekibi', 'ETUT', 1, NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(8, 'Jeofizik Ekibi', 'JEOFIZIK', 2, NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(9, 'İdari Ekip', 'IDARI', NULL, NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13'),
(10, 'Laboratuvar Ekibi', 'LAB', 5, NULL, 1, '2026-05-16 17:17:13', '2026-05-16 17:17:13');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `team_members`
--

CREATE TABLE `team_members` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `tracked_devices`
--

CREATE TABLE `tracked_devices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `device_number` varchar(30) DEFAULT NULL,
  `token` varchar(64) NOT NULL,
  `assigned_user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `color` varchar(7) NOT NULL DEFAULT '#3b82f6',
  `icon` varchar(10) NOT NULL DEFAULT '?',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `last_lat` decimal(10,7) DEFAULT NULL,
  `last_lng` decimal(10,7) DEFAULT NULL,
  `last_accuracy` decimal(8,2) DEFAULT NULL,
  `last_battery` tinyint(3) UNSIGNED DEFAULT NULL,
  `last_seen_at` timestamp NULL DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `users`
--

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `username` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `plain_password` text DEFAULT 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Tablo döküm verisi `users`
--

INSERT INTO `users` (`id`, `username`, `name`, `email`, `email_verified_at`, `password`, `plain_password`, `phone`, `avatar`, `department_id`, `is_active`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'Admin', 'admin@keska.com.tr', '2026-05-16 17:17:13', '$2y$12$H5pUOALzHcsMJsBDZTEn9eRHbAtpk4OoQLiX87QmylYdsKgtcjgs.', 'eyJpdiI6ImN5M04rWWVjQWhQR3k4Y1VRSWJ2Q1E9PSIsInZhbHVlIjoid3lycnY4WVVuYjY5eFNUMWF1NkZCZz09IiwibWFjIjoiMmQ3ODFjMTIyZWI1OTA1ODRhOTQxYzNlMWJhNTdhY2VkOTEwOWQ1NWZlNGU3NGNlMzE5YWZiMTM0Y2I4MTRkMSIsInRhZyI6IiJ9', '0555 000 0000', NULL, NULL, 1, NULL, '2026-05-16 17:17:13', '2026-05-17 08:29:06'),
(2, 'fahrettinbelci', 'Fahrettin BELCİ', NULL, NULL, '$2y$12$.H0N/tX4voqTSPvuIIxZBei/PZfVpjazc1o5frHWq71LNiMQIjcQu', 'eyJpdiI6ImlrUEJzSU1DWmd4WXFGQ1IvT1BDMEE9PSIsInZhbHVlIjoiZGhPdGVRU0RkU05jTjNCTWxjdEdWdz09IiwibWFjIjoiMDhhMTNhNTU2ZGI5ZGFmYmU0YWEyNmViZjJiNDJhODJjOWE0YTFjN2FlMGUwZjY3YTFjODQxMGY2MDkwNjUzNiIsInRhZyI6IiJ9', '05375556110', NULL, 1, 1, NULL, '2026-05-17 08:22:50', '2026-05-17 08:22:50'),
(3, 'ebrueksionat', 'Ebru Ekşi ONAT', NULL, NULL, '$2y$12$WNRspij8zj.gEMgwP3SHkeZ0CHu11c48A/gKmsagyke0/tXa369Qi', 'eyJpdiI6IjhjdHlucHdPa29QWkQwMlZJSEVyYkE9PSIsInZhbHVlIjoiMXlsUHRtWU84VjVtd0dhVVV2OWc4dz09IiwibWFjIjoiN2EwODc2MDJiYTBlNGMxMTY5YmE2ZWE2NTBlOTEzZjRhOTBlMGI5MmRiYTVjNTRlZWVkYmM0ODI1ZGNjOGRkYSIsInRhZyI6IiJ9', '05316954091', NULL, 1, 1, NULL, '2026-05-17 08:22:50', '2026-05-17 08:22:50'),
(4, 'begumgunes', 'Begüm GÜNEŞ', NULL, NULL, '$2y$12$c5sX/cVQCWduxhKORkBKEeTanWjx0a6NviZpB0AFGNRPgvl/u5i/2', 'eyJpdiI6IjVWUFkvVFJRMlBnZWd3bzJOZzFLa1E9PSIsInZhbHVlIjoiSUNuVWRmVGUvNGpITVVwYzJxczdlQT09IiwibWFjIjoiOGE0ZmY0NjkzYjFjYTE3YWU3MDRkOGViN2ViNjgxZTA5MGFkNThiNmEwYjYwZTFmMmVmOTEwNzVlOTMwYTU4ZCIsInRhZyI6IiJ9', '05419361306', NULL, 1, 1, NULL, '2026-05-17 08:22:50', '2026-05-17 08:22:50'),
(5, 'tameronat', 'Tamer ONAT', NULL, NULL, '$2y$12$IgnEfttk3egevg0k.pjjdevJCUwQBCpuhZOkSSQ72kGZQ89BCGNKm', 'eyJpdiI6IkMvR01yWGd4Q3RsNHdEdkxEWjNUWVE9PSIsInZhbHVlIjoiMjRJQ21FdWR6R2YxWTg2Ky9CZnZLUT09IiwibWFjIjoiNTU0NDA2YTg3NjA5YjhmMDAxZTQxZjllNWRlZjVhMDVlNTI4ZWM2NWU0Yjc5NGE3MDY4NWY0MDg5YTcyODM1YyIsInRhZyI6IiJ9', '05382461242', NULL, 1, 1, NULL, '2026-05-17 08:22:51', '2026-05-17 08:22:51'),
(6, 'aliozencsahin', 'Ali Özenç ŞAHİN', NULL, NULL, '$2y$12$6Ha1lJW6KMrbVR6xKxvsxu305nor5XiT/Z1TYO64ZWaoNULTzbTdi', 'eyJpdiI6IlZITlc3NlR1azBjaitkL2V2TXFHcGc9PSIsInZhbHVlIjoiajJxeTFpSGNXVnJCMjlEZlJNcEFidz09IiwibWFjIjoiMTBjYzU5NWEyYTVmY2YxYWRiZGM2MjBkMThkODUxMzU1MmQzMzY0ZmMwNzZiZjdjYjFhYjIyN2E4YjIwYWU5NiIsInRhZyI6IiJ9', '05340797083', NULL, 1, 1, NULL, '2026-05-17 08:22:51', '2026-05-17 08:22:51'),
(7, 'metinayyildiz', 'Metin AYYILDIZ', NULL, NULL, '$2y$12$8xaMCVEbJTb9UDH9nMhJZ.vl0gPKPMAyjzOXnZMQ9WJfABUpTxUJS', 'eyJpdiI6Ik1DclFvajd5UXZKVFRIUmxibUpRcFE9PSIsInZhbHVlIjoiZmIxVG5uNVlYK0tmSHVuOHdNeUVTZz09IiwibWFjIjoiNmQyNmFkNjc5YjA4NGEwNjZlOTRiMDEzZTk2YmVmMGU5NWE3YzUzZWRiMDNmYTkwZDY3NmIxYWQ3NGViMDA4OSIsInRhZyI6IiJ9', '05317786921', NULL, 2, 1, NULL, '2026-05-17 08:22:51', '2026-05-17 08:22:51'),
(8, 'melihgokce', 'Melih GÖKÇE', NULL, NULL, '$2y$12$dyJaShyhTlidy7cqA3Z9ye7wbX9kx6NWlQppy//EAObuGFV7EXuh.', 'eyJpdiI6ImJGSVNUcy9MeUU5WlJMSGpTQlZEUlE9PSIsInZhbHVlIjoicTA5dmpCZjg3VzY2VXgzZG9keFJ1Zz09IiwibWFjIjoiMmZmYWYzNDQ4MzA3ZTdjNGVkNGFjZjA4NmEwYWMwMmUxNzVlMWQwOTJjNDc0NzRjNjllZmFjYzIwN2JkOGFlZCIsInRhZyI6IiJ9', '05349286657', NULL, 2, 1, NULL, '2026-05-17 08:22:51', '2026-05-17 08:22:51'),
(9, 'emrahmurat', 'Emrah MURAT', NULL, NULL, '$2y$12$m0ybrkypwXdKjPNgvACyxueYqaRdwbA4ofFriaKAFwGHaoqtnZhsi', 'eyJpdiI6IlhzNkpiUFlTK3VVbDRZSzIxaTZES0E9PSIsInZhbHVlIjoiTWd6MWpmN3lzeVNXV0hYNTlwY0ZSUT09IiwibWFjIjoiNTVmZmMwZGJhNjFmNWE3M2E4MjIzZjZkOGQyZTg2MmNjNmRjNWI1YjZkYTAxM2MxYmJjOTE5MjdlMGVmZDEyMyIsInRhZyI6IiJ9', '05422180297', NULL, 2, 1, NULL, '2026-05-17 08:22:52', '2026-05-17 08:22:52'),
(10, 'hakandanaci', 'Hakan DANACI', NULL, NULL, '$2y$12$4ZYXZ1LLL7c8vd9ImbNbyuulu4GOtZVi60/1zrwyFJfOZ.U8zGkWm', 'eyJpdiI6IkliMm9help5TWE0bHNjYjNVUmRac0E9PSIsInZhbHVlIjoiN29HSlhGRkpvbmZXYmVTYlAzeVorQT09IiwibWFjIjoiNGE3NGNmNGIxMjVkMGZhZjA1NDRiZmM5NGRhZGJmZGU0MTYzNTM4N2MyOTYyZjlhMWI2NzdhYjM0MDE5MjI5MSIsInRhZyI6IiJ9', '05314395646', NULL, 3, 1, NULL, '2026-05-17 08:22:52', '2026-05-17 08:22:52'),
(11, 'omerkiyagan', 'Ömer KIYAĞAN', NULL, NULL, '$2y$12$Tpkpr6H4JfdhF4XzedPHceUYxvz2AvPHohzPcF1nRoGojBy9QBzP.', 'eyJpdiI6Ik8zeWgzc2NxSFBEbG1QTDBzL1FyOGc9PSIsInZhbHVlIjoieFpZR2dtSjM5YURZQ0huTnVFdzZzQT09IiwibWFjIjoiYmM4MWY5NzNhMGNhYmIxNzJmMTM2ZjUwNDdkYjg5NDMxMjQ0YjhhZTZiYjg1NGVhNTUzN2Y3MTViZjEzMWJhYyIsInRhZyI6IiJ9', '05326961156', NULL, 3, 1, NULL, '2026-05-17 08:22:52', '2026-05-17 08:22:52'),
(12, 'elifmut', 'Elif MUT', NULL, NULL, '$2y$12$lPbL0UjY.GDVIAf5KJeP/uylk1MGcVC0ont1DYpJsozO9DBn7F6RK', 'eyJpdiI6Im51cVczOGRCcDFNZnpjT21UdlRvblE9PSIsInZhbHVlIjoiZ2JSNDlsdEl0YWVCNVN5WmFIZWQzZz09IiwibWFjIjoiNGExM2I1MGU5MjFiNTJkMWFiY2E3ZGFjYTg2YWY2MmIzN2IzMzE3M2FlMzdkNTA0MDY0N2I5YTE1NmRkMDgwMCIsInRhZyI6IiJ9', '05466140641', NULL, 3, 1, NULL, '2026-05-17 08:22:52', '2026-05-17 08:22:52'),
(13, 'mustafaozcan', 'Mustafa ÖZCAN', NULL, NULL, '$2y$12$aFOyBbvHpRbmWYxWfklxqujeCdGCx27SbBH0Moe8k1CQypA4Hi8qG', 'eyJpdiI6InpkdmxUbTBYMzBBK1Zkdlc2WldCd0E9PSIsInZhbHVlIjoiYTBld0ZzY3pCNTgxQlcrU3YvQTlEdz09IiwibWFjIjoiNTZjNmZmMzNiOTBkNzk2ZGI5NDM0Zjc0ZTI1MDg0MDYzM2I2MjUzMjMyY2U0ZjYyNjhjNGM5NWRjMGVlNzY2MyIsInRhZyI6IiJ9', '05302286576', NULL, 4, 1, NULL, '2026-05-17 08:22:53', '2026-05-17 08:22:53'),
(14, 'gokhantoraman', 'Gökhan TORAMAN', NULL, NULL, '$2y$12$VBUUZ7OBYBq5dppN1kNmteEQd0p1NVKaCYHGn86ICsSBnXgGEnWwS', 'eyJpdiI6IkVLVmRrd1dwcFcwdEl5YUhPZFhMOFE9PSIsInZhbHVlIjoiM0F4b2xwZHVsRW04TTNRTkQzdkRNQT09IiwibWFjIjoiYWUxNzRmY2Q2Y2QxNzA1NDFiYmQwZWNhMjc1M2NmYTFjM2NlMmExNmNmN2Q2MjRmZTVjMWJkMGE3MzA3MzFjNyIsInRhZyI6IiJ9', '05459183716', NULL, 4, 1, NULL, '2026-05-17 08:22:53', '2026-05-17 08:22:53'),
(15, 'kenanyildiz', 'Kenan YILDIZ', NULL, NULL, '$2y$12$L511n9tMme/91Tx7P8Z.weHizK8lDvOvT4Zlw17ojuYSBQhxeWp/q', 'eyJpdiI6ImlZVm1VUHowck5kTmVOQngvMG1Gb2c9PSIsInZhbHVlIjoiWC9jS0lVSU9FTzJsM0hvNzZKWjV2Zz09IiwibWFjIjoiNDVmNzI5MmE2ZmNiMTdhOTYyZWY0NmY0Y2Y4OTRlMjIwYWM0Y2E0ZDZjZmUyZTE4OWU5YzRkMDA1ZDQ0NjI5YiIsInRhZyI6IiJ9', '05306524371', NULL, 5, 1, NULL, '2026-05-17 08:22:53', '2026-05-17 08:22:53'),
(16, 'huseyinbayram', 'Hüseyin BAYRAM', NULL, NULL, '$2y$12$KbtFQZxcka/JpLc.guALVOpHWeSOIEg97r3OERM8cFTXFf6/OoBua', 'eyJpdiI6IkhSWkJnOE43MmNla2hoWG8raCsvYmc9PSIsInZhbHVlIjoibGpQZDEzQWNBeE9maGFVc0hPZE1xQT09IiwibWFjIjoiYjNhMjJmYjUxMTM4NTNjYjA1ODJjNzZiZTVlNzkyZTA0YTMyZDY5MGZiNzk0OGNjOGI1MWYzZGM1NTc1NDgwYyIsInRhZyI6IiJ9', '05444212500', NULL, 6, 1, NULL, '2026-05-17 08:22:53', '2026-05-17 08:22:53'),
(17, 'yilmazcetin', 'Yılmaz ÇETİN', NULL, NULL, '$2y$12$MtFQdkQiUYIfPV3GKiHNf.rg/1fjNIoSWNlYIePsGZvZwKGzhfSB6', 'eyJpdiI6IlFjU0YxL2VEZ3huamw0Q1dtZHlBY0E9PSIsInZhbHVlIjoiT290QTVuUml6ek95YW5ETFZOSnJQQT09IiwibWFjIjoiODZjMDJjNmQ3ZWUzNGM3MjlkODVkZTEyNmFlNDY1MWFmMzM5OTFkMTEzOTljNDNlYWIzYzY0YmNkNTAwYzliNCIsInRhZyI6IiJ9', '05302646509', NULL, 6, 1, NULL, '2026-05-17 08:22:53', '2026-05-17 08:22:53'),
(18, 'demirkanfiratdemirkaya', 'Demirkan Fırat DEMİRKAYA', NULL, NULL, '$2y$12$Pzs.iHgd3rk7mRouJJRee..61o7GHMrMeUI9MoeXB2bnqR7d.wDqO', 'eyJpdiI6IjhrVDJYYVc5NjN3ZzlNd01mWmhyc3c9PSIsInZhbHVlIjoiNzR0d2xHdnp5MDlmcHRFZDVXUGVHUT09IiwibWFjIjoiNGI0MjgzMjk5MGU2NGMxNzJhMDhkNmIzMjkzNjYwOTYxYjgwYmQ0MGJlOTkyYWMwNzA2ZGE1ZTc1MjhiNjc4MiIsInRhZyI6IiJ9', '05427916895', NULL, 6, 1, NULL, '2026-05-17 08:22:54', '2026-05-17 08:22:54'),
(19, 'tugberkdogancay', 'Tuğberk DOĞANÇAY', NULL, NULL, '$2y$12$xifobNjvGrOvj2BSty3qSeHrLiiKh0PcHChTRst0pLH0qNA2j1NUe', 'eyJpdiI6IkxKVS9lMlV0YUpOb2N3Zy91Tk81ZWc9PSIsInZhbHVlIjoiWE9uY1laenozbmhzQkpQL2tQNmkzUT09IiwibWFjIjoiMjgzMTczZDU0ZGRhOTkzNjRhZDNmYWU5YjBlOGFkNTljNGE1M2IzMDYzMWUzYmI2MGZjYWQ4MDQ0NjBiMzBkZiIsInRhZyI6IiJ9', '05517117529', NULL, 6, 1, NULL, '2026-05-17 08:22:54', '2026-05-17 08:22:54'),
(20, 'ozgursezerferman', 'Özgür Sezer FERMAN', NULL, NULL, '$2y$12$PBQCQpNrjFxGrlEkODAR2uU7lId5H.8aSJyyxA9.sMt1rzRHfg95O', 'eyJpdiI6InUrQnpuOEQzTjdQYWNKUEJZL2xianc9PSIsInZhbHVlIjoiaTlqSEFOTG5JRDVGYTd5dnI2NnhXdz09IiwibWFjIjoiZWQwZTBjN2VlYjlkMTgxZTA1YTFiYmM4YWFmNzI4ZGU3MTZkNTc4NmE0ZmFhNTE0YTQyMjk5NWFhZjg5ZjMxYSIsInRhZyI6IiJ9', '05318497054', NULL, 6, 1, NULL, '2026-05-17 08:22:54', '2026-05-17 08:22:54'),
(21, 'sezginferman', 'Sezgin FERMAN', NULL, NULL, '$2y$12$yw9Hjyh6mkcfoRbv1NqSaO1.lhXAp5kO5JiIPs4qpIQPLFAiNd2gi', 'eyJpdiI6IlA0VGpHZ3NVbk05Y0M2bG5TVld6elE9PSIsInZhbHVlIjoiN3N3REhhci9JYmduS1UxMWRheUUwdz09IiwibWFjIjoiMGJjODJmNGI1MTQzZTZhOGU3YjQzNWEwNWUxMWQ0NTQ3Yzc1MTZkZDlkMGIzZGNiYWNjZjA2ODk0ZmRhNTc5NyIsInRhZyI6IiJ9', '05365036591', NULL, 6, 1, NULL, '2026-05-17 08:22:54', '2026-05-17 08:22:54'),
(22, 'vedatkadak', 'Vedat KADAK', NULL, NULL, '$2y$12$z9cgpj6EZg8Z55wCnfqwb.MziQEZiamyW3MraKA2y7HFaZtDA9m1i', 'eyJpdiI6InBaaURkUHdRVUsxOXRuVFFubmhHSGc9PSIsInZhbHVlIjoic0Fva21BUCtCRTR6VVZKYlp0OW44QT09IiwibWFjIjoiOGE3ZTNiOWY4ZWViNDFkNzBmYWM5ZDY5YjUzZDU5NWU1MWQ0YTAzMGMzNDBkM2IyNGMwOTgzMzU4NTQyNWUzNiIsInRhZyI6IiJ9', '05379288274', NULL, 6, 1, NULL, '2026-05-17 08:22:55', '2026-05-17 08:22:55'),
(23, 'botirmakhmanazarov', 'Botir MAKHMANAZAROV', NULL, NULL, '$2y$12$X3Mgg49xdtUVH1OBh2fAvewFeIICSqUgtHbP5vZTxy71r1kKB0Fua', 'eyJpdiI6InF3SGNDMllvNkFyTTc0NS9pZU1ZOEE9PSIsInZhbHVlIjoiSzB3YzkrTFNQZWRxUU1oamFDRTRGUT09IiwibWFjIjoiYTc1MTk5MTU1NDZmNDg2MDMwYWFjOWJjNTdlNmRjYTc2NWFmYTFhOGRhZDJkNjc2YTQ3MmQ0Y2UxNDYwODAzYyIsInRhZyI6IiJ9', '+998507554574', NULL, 6, 1, NULL, '2026-05-17 08:22:55', '2026-05-17 08:22:55'),
(24, 'ergunmulayim', 'Ergün MÜLAYİM', NULL, NULL, '$2y$12$t9DRiZvLnhfGP7Nd9LNaP.1F3hZSmpvgxfeRnckXc18jGh82UnYz6', 'eyJpdiI6IndBL1E0VTNmUFpZL0pNZGpUOU9zRmc9PSIsInZhbHVlIjoiVjNKUnl5Kzl2YVYzc2VMbUJGZG1TZz09IiwibWFjIjoiYmYxMjU2YjA1ZTY0NTllMjI1NzJjZjkwM2VmNDFmMWM3MzU4MGY4ZjlkN2UwZjVkNGE4OGFhNjkzYzI2OGUzYSIsInRhZyI6IiJ9', '05439541822', NULL, 6, 1, NULL, '2026-05-17 08:22:55', '2026-05-17 08:22:55'),
(25, 'erkanozgur', 'Erkan ÖZGÜR', NULL, NULL, '$2y$12$oc60rIdpoS5sUdfOcM6NZ.un6qcElQQ0XgEGoMRT1AgFU48El1Xa2', 'eyJpdiI6Img2U1NXaDRvdDljdHVuSUtvYUJTM1E9PSIsInZhbHVlIjoiTW5tb0FpTHdOelV1Y3ZFeU96c2Erdz09IiwibWFjIjoiNWUyNzA1ZTg2MzI2ZDI0MmFjMzIyZjMxMGFlZTg5MDk0ZTAxZmRmYjQzNjcyZDZmYTI4NTg3NGRhMmQyYjYyMCIsInRhZyI6IiJ9', '05365560379', NULL, 6, 1, NULL, '2026-05-17 08:22:55', '2026-05-17 08:22:55'),
(26, 'melihtasdemir', 'Melih TAŞDEMİR', NULL, NULL, '$2y$12$k2Ly2JEYCyii1LnpvByeW.6Xljdb0Oh24Ui5.suh0bbj6quAkIZ4m', 'eyJpdiI6IkgyZHdMSDNtZk82Q1lhbmVuWktpbkE9PSIsInZhbHVlIjoiV0w3c3JpMFNLbmJoZFBwVjVQWitSUT09IiwibWFjIjoiNDNhYTU1MDZlZGE1MDMzOTJmY2E2NWYyMGQ5MGFhODQ0ZDA2OTljM2NiODNjZGRhYjMxNTNmYjAwZTYyNDQ4OCIsInRhZyI6IiJ9', '05544424171', NULL, 6, 1, NULL, '2026-05-17 08:22:56', '2026-05-17 08:22:56'),
(27, 'muharremtoraman', 'Muharrem TORAMAN', NULL, NULL, '$2y$12$.27HZCdrj1DqwyF2i37/T.qRDgfmnleh3CQmuhh/IzoFxOI4kg7j.', 'eyJpdiI6IjIxKzB6dzJ2QklsdzB0M2NuWkVHSnc9PSIsInZhbHVlIjoibDdKNlJVdUpiNiszU05LMnBLeC9zQT09IiwibWFjIjoiMzdkY2RhYTlhMjE5YTI3YmY3ZDYwMjQ3YTJhMTAxNmEzZGM4NWFhMTU1NWQ1N2MzYzc1YTA3NTg5NWM2M2M4NSIsInRhZyI6IiJ9', '05323819930', NULL, 6, 1, NULL, '2026-05-17 08:22:56', '2026-05-17 08:22:56'),
(28, 'veliucman', 'Veli UÇMAN', NULL, NULL, '$2y$12$ZQ4IEXfkFb6tJHvKq7Miw.hhVEIe9xlGo0rPbaigE9S095hKX3Tcq', 'eyJpdiI6ImVFVHR2R1IzUGxNcHNkdTJiUmZWOUE9PSIsInZhbHVlIjoib1A2TW5jM2hVdU8ybDhnSGxBRnRLdz09IiwibWFjIjoiNzQ5ZjE5NzY5ZjVmNjg4MGNlYzkzZWUyNWQzMmE0YTg5ZTY4YTRjNGVkNTU2MTc0YmQyZDUxY2E3Njg0YjJiNyIsInRhZyI6IiJ9', '05322713110', NULL, 6, 1, NULL, '2026-05-17 08:22:56', '2026-05-17 08:22:56'),
(29, 'necatiyalin', 'Necati YALIN', NULL, NULL, '$2y$12$OR6anLE5H9BCo2w86wlJqewbtd3kkBVIuCULgs87NXsvCI1jVrGui', 'eyJpdiI6InlyVjllVFY5d3E2cXB2QkNEcndSdmc9PSIsInZhbHVlIjoiOVNpWmQxekdDMzkzY0NPQmQ5b1BPZz09IiwibWFjIjoiNmVmMWVjY2VhZGJiZjFlYzFkM2YzNzZlNzRmZDE5OGZmYTE0YjUxYWI3M2IwNTU0MjI2ZmRlZGZhOTIwM2I0MCIsInRhZyI6IiJ9', '05468949421', NULL, 6, 1, NULL, '2026-05-17 08:22:56', '2026-05-17 08:22:56');

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `vehicles`
--

CREATE TABLE `vehicles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `vehicle_number` varchar(30) DEFAULT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `vehicle_documents`
--

CREATE TABLE `vehicle_documents` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `versions`
--

CREATE TABLE `versions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `version_number` varchar(255) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `notes` longtext DEFAULT NULL,
  `is_published` tinyint(1) NOT NULL DEFAULT 0,
  `published_at` timestamp NULL DEFAULT NULL,
  `published_by` bigint(20) UNSIGNED DEFAULT NULL,
  `backup_path` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tablo için tablo yapısı `warehouses`
--

CREATE TABLE `warehouses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dökümü yapılmış tablolar için indeksler
--

--
-- Tablo için indeksler `activity_logs`
--
ALTER TABLE `activity_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `activity_logs_user_id_index` (`user_id`),
  ADD KEY `activity_logs_created_at_index` (`created_at`);

--
-- Tablo için indeksler `bordro_donemi`
--
ALTER TABLE `bordro_donemi`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `bordro_donemi_ay_yil_unique` (`ay`,`yil`),
  ADD KEY `bordro_donemi_created_by_foreign` (`created_by`);

--
-- Tablo için indeksler `bordro_kalemleri`
--
ALTER TABLE `bordro_kalemleri`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bordro_kalemleri_bordro_donemi_id_foreign` (`bordro_donemi_id`),
  ADD KEY `bordro_kalemleri_employee_id_foreign` (`employee_id`);

--
-- Tablo için indeksler `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_expiration_index` (`expiration`);

--
-- Tablo için indeksler `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_locks_expiration_index` (`expiration`);

--
-- Tablo için indeksler `cari_entries`
--
ALTER TABLE `cari_entries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cari_entries_contact_id_foreign` (`contact_id`),
  ADD KEY `cari_entries_project_id_foreign` (`project_id`),
  ADD KEY `cari_entries_created_by_foreign` (`created_by`),
  ADD KEY `cari_entries_hakedis_id_index` (`hakedis_id`),
  ADD KEY `cari_entries_fatura_id_idx` (`fatura_id`);

--
-- Tablo için indeksler `chat_messages`
--
ALTER TABLE `chat_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `chat_messages_user_id_foreign` (`user_id`),
  ADD KEY `chat_msg_room_date_idx` (`chat_room_id`,`created_at`),
  ADD KEY `chat_messages_reply_to_id_foreign` (`reply_to_id`);

--
-- Tablo için indeksler `chat_rooms`
--
ALTER TABLE `chat_rooms`
  ADD PRIMARY KEY (`id`),
  ADD KEY `chat_rooms_created_by_foreign` (`created_by`);

--
-- Tablo için indeksler `chat_room_members`
--
ALTER TABLE `chat_room_members`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `chat_room_members_chat_room_id_user_id_unique` (`chat_room_id`,`user_id`),
  ADD KEY `chat_member_user_idx` (`user_id`,`chat_room_id`);

--
-- Tablo için indeksler `contacts`
--
ALTER TABLE `contacts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `contacts_contact_number_unique` (`contact_number`);

--
-- Tablo için indeksler `contact_addresses`
--
ALTER TABLE `contact_addresses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `contact_addresses_contact_id_foreign` (`contact_id`);

--
-- Tablo için indeksler `contact_notes`
--
ALTER TABLE `contact_notes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `contact_notes_contact_id_foreign` (`contact_id`),
  ADD KEY `contact_notes_user_id_foreign` (`user_id`);

--
-- Tablo için indeksler `departments`
--
ALTER TABLE `departments`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `departments_slug_unique` (`slug`),
  ADD KEY `departments_manager_id_foreign` (`manager_id`);

--
-- Tablo için indeksler `device_locations`
--
ALTER TABLE `device_locations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `device_locations_device_id_recorded_at_index` (`device_id`,`recorded_at`);

--
-- Tablo için indeksler `employees`
--
ALTER TABLE `employees`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `employees_sicil_no_unique` (`personel_kodu`),
  ADD UNIQUE KEY `employees_personnel_id_unique` (`personnel_id`),
  ADD KEY `employees_department_id_foreign` (`department_id`),
  ADD KEY `employees_user_id_foreign` (`user_id`),
  ADD KEY `employees_created_by_foreign` (`created_by`);

--
-- Tablo için indeksler `expert_reports`
--
ALTER TABLE `expert_reports`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `expert_reports_report_number_unique` (`report_number`),
  ADD KEY `expert_reports_reportable_type_reportable_id_index` (`reportable_type`,`reportable_id`),
  ADD KEY `expert_reports_reported_by_foreign` (`reported_by`);

--
-- Tablo için indeksler `expert_report_photos`
--
ALTER TABLE `expert_report_photos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `expert_report_photos_expert_report_id_foreign` (`expert_report_id`);

--
-- Tablo için indeksler `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Tablo için indeksler `faturalar`
--
ALTER TABLE `faturalar`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `faturalar_fatura_no_unique` (`fatura_no`),
  ADD KEY `faturalar_proje_id_foreign` (`proje_id`),
  ADD KEY `faturalar_created_by_foreign` (`created_by`),
  ADD KEY `faturalar_approved_by_foreign` (`approved_by`),
  ADD KEY `faturalar_contact_status_idx` (`contact_id`,`status`),
  ADD KEY `faturalar_hakedis_id_idx` (`hakedis_id`);

--
-- Tablo için indeksler `fatura_kalemleri`
--
ALTER TABLE `fatura_kalemleri`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fatura_kalemleri_fatura_id_foreign` (`fatura_id`);

--
-- Tablo için indeksler `field_data_entries`
--
ALTER TABLE `field_data_entries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `field_data_entries_project_id_foreign` (`project_id`),
  ADD KEY `field_data_entries_submitted_by_foreign` (`submitted_by`),
  ADD KEY `field_data_entries_reviewed_by_foreign` (`reviewed_by`),
  ADD KEY `field_data_entries_field_plan_type_field_plan_id_index` (`field_plan_type`,`field_plan_id`);

--
-- Tablo için indeksler `field_plans`
--
ALTER TABLE `field_plans`
  ADD PRIMARY KEY (`id`),
  ADD KEY `field_plans_created_by_foreign` (`created_by`),
  ADD KEY `field_plans_scheduled_date_index` (`scheduled_date`),
  ADD KEY `field_plans_project_id_scheduled_date_index` (`project_id`,`scheduled_date`),
  ADD KEY `field_plans_module_type_index` (`module_type`);

--
-- Tablo için indeksler `field_plan_personnel`
--
ALTER TABLE `field_plan_personnel`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `field_plan_personnel_field_plan_id_personnel_id_unique` (`field_plan_id`,`personnel_id`),
  ADD KEY `field_plan_personnel_personnel_id_foreign` (`personnel_id`);

--
-- Tablo için indeksler `field_plan_service_items`
--
ALTER TABLE `field_plan_service_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `field_plan_service_items_field_plan_id_service_item_id_unique` (`field_plan_id`,`service_item_id`),
  ADD KEY `field_plan_service_items_service_item_id_foreign` (`service_item_id`);

--
-- Tablo için indeksler `field_plan_vehicles`
--
ALTER TABLE `field_plan_vehicles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `field_plan_vehicles_field_plan_id_vehicle_id_unique` (`field_plan_id`,`vehicle_id`),
  ADD KEY `field_plan_vehicles_vehicle_id_foreign` (`vehicle_id`);

--
-- Tablo için indeksler `field_work_log_personnel`
--
ALTER TABLE `field_work_log_personnel`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `field_work_log_personnel_field_work_log_id_personnel_id_unique` (`field_work_log_id`,`personnel_id`),
  ADD KEY `field_work_log_personnel_personnel_id_foreign` (`personnel_id`);

--
-- Tablo için indeksler `field_work_log_vehicles`
--
ALTER TABLE `field_work_log_vehicles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `field_work_log_vehicles_field_work_log_id_vehicle_id_unique` (`field_work_log_id`,`vehicle_id`),
  ADD KEY `field_work_log_vehicles_vehicle_id_foreign` (`vehicle_id`);

--
-- Tablo için indeksler `hakedisler`
--
ALTER TABLE `hakedisler`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `hakedisler_hakedis_no_unique` (`hakedis_no`),
  ADD KEY `hakedisler_approved_by_foreign` (`approved_by`),
  ADD KEY `hakedisler_created_by_foreign` (`created_by`),
  ADD KEY `hakedisler_siparis_id_status_index` (`siparis_id`,`status`),
  ADD KEY `hakedisler_project_id_status_index` (`project_id`,`status`),
  ADD KEY `hakedisler_contact_id_status_index` (`contact_id`,`status`),
  ADD KEY `hakedisler_hakedis_date_index` (`hakedis_date`),
  ADD KEY `hakedisler_tip_index` (`tip`);

--
-- Tablo için indeksler `hakedis_kalemleri`
--
ALTER TABLE `hakedis_kalemleri`
  ADD PRIMARY KEY (`id`),
  ADD KEY `hakedis_kalemleri_service_item_id_foreign` (`service_item_id`),
  ADD KEY `hakedis_kalemleri_hakedis_id_index` (`hakedis_id`),
  ADD KEY `hakedis_kalemleri_siparis_kalem_id_index` (`siparis_kalem_id`);

--
-- Tablo için indeksler `harita_role_categories`
--
ALTER TABLE `harita_role_categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `harita_role_categories_role_id_poi_category_id_unique` (`role_id`,`poi_category_id`),
  ADD KEY `harita_role_categories_poi_category_id_foreign` (`poi_category_id`);

--
-- Tablo için indeksler `harita_role_devices`
--
ALTER TABLE `harita_role_devices`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `harita_role_devices_role_id_tracked_device_id_unique` (`role_id`,`tracked_device_id`),
  ADD KEY `harita_role_devices_tracked_device_id_foreign` (`tracked_device_id`);

--
-- Tablo için indeksler `inventory_categories`
--
ALTER TABLE `inventory_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `inventory_categories_parent_id_foreign` (`parent_id`);

--
-- Tablo için indeksler `inventory_items`
--
ALTER TABLE `inventory_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `inventory_items_code_unique` (`code`),
  ADD KEY `inventory_items_category_id_foreign` (`category_id`);

--
-- Tablo için indeksler `inventory_movements`
--
ALTER TABLE `inventory_movements`
  ADD PRIMARY KEY (`id`),
  ADD KEY `inventory_movements_warehouse_id_foreign` (`warehouse_id`),
  ADD KEY `inventory_movements_reference_type_reference_id_index` (`reference_type`,`reference_id`),
  ADD KEY `inventory_movements_moved_by_foreign` (`moved_by`),
  ADD KEY `inventory_movements_inventory_item_id_type_index` (`inventory_item_id`,`type`);

--
-- Tablo için indeksler `izin_talepleri`
--
ALTER TABLE `izin_talepleri`
  ADD PRIMARY KEY (`id`),
  ADD KEY `izin_talepleri_employee_id_foreign` (`employee_id`),
  ADD KEY `izin_talepleri_izin_turu_id_foreign` (`izin_turu_id`),
  ADD KEY `izin_talepleri_onaylayan_id_foreign` (`onaylayan_id`);

--
-- Tablo için indeksler `izin_turleri`
--
ALTER TABLE `izin_turleri`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `jeofizik_field_plans`
--
ALTER TABLE `jeofizik_field_plans`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `jeofizik_field_plans_plan_number_unique` (`plan_number`),
  ADD KEY `jeofizik_field_plans_created_by_foreign` (`created_by`),
  ADD KEY `jeofizik_field_plans_scheduled_date_index` (`scheduled_date`),
  ADD KEY `jeofizik_field_plans_project_id_scheduled_date_index` (`project_id`,`scheduled_date`);

--
-- Tablo için indeksler `jeofizik_field_plan_personnel`
--
ALTER TABLE `jeofizik_field_plan_personnel`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `jfp_personnel_unique` (`jeofizik_field_plan_id`,`personnel_id`),
  ADD KEY `jeofizik_field_plan_personnel_personnel_id_foreign` (`personnel_id`);

--
-- Tablo için indeksler `jeofizik_field_plan_vehicles`
--
ALTER TABLE `jeofizik_field_plan_vehicles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `jfp_vehicle_unique` (`jeofizik_field_plan_id`,`vehicle_id`),
  ADD KEY `jeofizik_field_plan_vehicles_vehicle_id_foreign` (`vehicle_id`);

--
-- Tablo için indeksler `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Tablo için indeksler `job_batches`
--
ALTER TABLE `job_batches`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `laboratory_samples`
--
ALTER TABLE `laboratory_samples`
  ADD PRIMARY KEY (`id`),
  ADD KEY `laboratory_samples_project_id_foreign` (`project_id`);

--
-- Tablo için indeksler `lab_firms`
--
ALTER TABLE `lab_firms`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `lab_tests`
--
ALTER TABLE `lab_tests`
  ADD PRIMARY KEY (`id`),
  ADD KEY `lab_tests_lab_firm_id_foreign` (`lab_firm_id`);

--
-- Tablo için indeksler `machines`
--
ALTER TABLE `machines`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `machines_code_unique` (`code`),
  ADD UNIQUE KEY `machines_machine_number_unique` (`machine_number`),
  ADD KEY `machines_vehicle_id_foreign` (`vehicle_id`),
  ADD KEY `machines_team_id_foreign` (`team_id`);

--
-- Tablo için indeksler `maintenance_parts`
--
ALTER TABLE `maintenance_parts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `maintenance_parts_maintenance_record_id_foreign` (`maintenance_record_id`);

--
-- Tablo için indeksler `maintenance_records`
--
ALTER TABLE `maintenance_records`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `maintenance_records_maintenance_number_unique` (`maintenance_number`),
  ADD KEY `maintenance_records_maintainable_type_maintainable_id_index` (`maintainable_type`,`maintainable_id`),
  ADD KEY `maintenance_records_reported_by_foreign` (`reported_by`),
  ADD KEY `maintenance_records_assigned_to_foreign` (`assigned_to`),
  ADD KEY `maint_poly_status_idx` (`maintainable_type`,`maintainable_id`,`status`);

--
-- Tablo için indeksler `maintenance_schedules`
--
ALTER TABLE `maintenance_schedules`
  ADD PRIMARY KEY (`id`),
  ADD KEY `maintenance_schedules_maintainable_type_maintainable_id_index` (`maintainable_type`,`maintainable_id`);

--
-- Tablo için indeksler `map_pois`
--
ALTER TABLE `map_pois`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `map_pois_code_unique` (`code`),
  ADD KEY `map_pois_contact_id_foreign` (`contact_id`),
  ADD KEY `map_pois_created_by_foreign` (`created_by`),
  ADD KEY `map_pois_category_id_index` (`category_id`),
  ADD KEY `map_pois_lat_lng_index` (`lat`,`lng`);

--
-- Tablo için indeksler `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Tablo için indeksler `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Tablo için indeksler `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Tablo için indeksler `notification_logs`
--
ALTER TABLE `notification_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notification_logs_sent_date_sent_time_index` (`sent_date`,`sent_time`);

--
-- Tablo için indeksler `notification_recipients`
--
ALTER TABLE `notification_recipients`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `notification_recipients_user_id_unique` (`user_id`);

--
-- Tablo için indeksler `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Tablo için indeksler `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`);

--
-- Tablo için indeksler `personnel`
--
ALTER TABLE `personnel`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `personnel_tc_no_unique` (`tc_no`),
  ADD UNIQUE KEY `personnel_personnel_number_unique` (`personnel_number`),
  ADD KEY `personnel_user_id_foreign` (`user_id`),
  ADD KEY `personnel_department_id_foreign` (`department_id`);

--
-- Tablo için indeksler `personnel_documents`
--
ALTER TABLE `personnel_documents`
  ADD PRIMARY KEY (`id`),
  ADD KEY `personnel_documents_personnel_id_foreign` (`personnel_id`);

--
-- Tablo için indeksler `poi_categories`
--
ALTER TABLE `poi_categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `poi_categories_slug_unique` (`slug`),
  ADD KEY `poi_categories_created_by_foreign` (`created_by`),
  ADD KEY `poi_categories_is_active_sort_order_index` (`is_active`,`sort_order`);

--
-- Tablo için indeksler `projects`
--
ALTER TABLE `projects`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `projects_project_number_unique` (`project_number`),
  ADD KEY `projects_proposal_id_foreign` (`proposal_id`),
  ADD KEY `projects_contact_id_foreign` (`contact_id`),
  ADD KEY `projects_third_party_id_foreign` (`third_party_id`),
  ADD KEY `projects_subcontractor_id_foreign` (`subcontractor_id`),
  ADD KEY `projects_manager_id_foreign` (`manager_id`),
  ADD KEY `projects_geology_engineer_id_foreign` (`geology_engineer_id`),
  ADD KEY `projects_civil_engineer_id_foreign` (`civil_engineer_id`),
  ADD KEY `projects_geotechnical_engineer_id_foreign` (`geotechnical_engineer_id`),
  ADD KEY `projects_status_idx` (`status`),
  ADD KEY `projects_city_idx` (`city`),
  ADD KEY `projects_project_responsible_id_foreign` (`project_responsible_id`),
  ADD KEY `projects_project_supervisor_id_foreign` (`project_supervisor_id`);

--
-- Tablo için indeksler `project_assignees`
--
ALTER TABLE `project_assignees`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `project_assignees_project_id_user_id_unique` (`project_id`,`user_id`),
  ADD KEY `project_assignees_user_id_foreign` (`user_id`);

--
-- Tablo için indeksler `project_documents`
--
ALTER TABLE `project_documents`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_documents_project_id_foreign` (`project_id`),
  ADD KEY `project_documents_uploaded_by_foreign` (`uploaded_by`);

--
-- Tablo için indeksler `project_field_measurements`
--
ALTER TABLE `project_field_measurements`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_field_measurements_field_work_log_id_foreign` (`field_work_log_id`),
  ADD KEY `project_field_measurements_service_item_id_foreign` (`service_item_id`);

--
-- Tablo için indeksler `project_field_wells`
--
ALTER TABLE `project_field_wells`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_field_wells_field_work_log_id_foreign` (`field_work_log_id`),
  ADD KEY `project_field_wells_service_item_id_foreign` (`service_item_id`);

--
-- Tablo için indeksler `project_field_work_logs`
--
ALTER TABLE `project_field_work_logs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `project_field_work_logs_log_number_unique` (`log_number`),
  ADD KEY `project_field_work_logs_project_id_foreign` (`project_id`),
  ADD KEY `project_field_work_logs_team_id_foreign` (`team_id`),
  ADD KEY `project_field_work_logs_vehicle_id_foreign` (`vehicle_id`),
  ADD KEY `project_field_work_logs_machine_id_foreign` (`machine_id`),
  ADD KEY `project_field_work_logs_created_by_foreign` (`created_by`),
  ADD KEY `project_field_work_logs_field_data_entry_id_foreign` (`field_data_entry_id`);

--
-- Tablo için indeksler `project_machines`
--
ALTER TABLE `project_machines`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_machines_project_id_foreign` (`project_id`),
  ADD KEY `project_machines_machine_id_foreign` (`machine_id`);

--
-- Tablo için indeksler `project_notes`
--
ALTER TABLE `project_notes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_notes_project_id_foreign` (`project_id`),
  ADD KEY `project_notes_user_id_foreign` (`user_id`);

--
-- Tablo için indeksler `project_other_completions`
--
ALTER TABLE `project_other_completions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_other_completions_project_planned_work_id_foreign` (`project_planned_work_id`),
  ADD KEY `project_other_completions_completed_by_foreign` (`completed_by`),
  ADD KEY `poc_proj_pw_idx` (`project_id`,`project_planned_work_id`),
  ADD KEY `project_other_completions_completed_at_index` (`completed_at`);

--
-- Tablo için indeksler `project_personnel`
--
ALTER TABLE `project_personnel`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_personnel_project_id_foreign` (`project_id`),
  ADD KEY `project_personnel_personnel_id_foreign` (`personnel_id`);

--
-- Tablo için indeksler `project_planned_geophysics`
--
ALTER TABLE `project_planned_geophysics`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_planned_geophysics_project_id_foreign` (`project_id`);

--
-- Tablo için indeksler `project_planned_wells`
--
ALTER TABLE `project_planned_wells`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_planned_wells_project_id_foreign` (`project_id`);

--
-- Tablo için indeksler `project_planned_works`
--
ALTER TABLE `project_planned_works`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_planned_works_project_id_foreign` (`project_id`),
  ADD KEY `project_planned_works_proposal_item_id_foreign` (`proposal_item_id`),
  ADD KEY `project_planned_works_service_item_id_foreign` (`service_item_id`),
  ADD KEY `project_planned_works_completed_by_foreign` (`completed_by`);

--
-- Tablo için indeksler `project_progress_components`
--
ALTER TABLE `project_progress_components`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `project_progress_components_slug_unique` (`slug`);

--
-- Tablo için indeksler `project_teams`
--
ALTER TABLE `project_teams`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_teams_project_id_foreign` (`project_id`),
  ADD KEY `project_teams_team_id_foreign` (`team_id`);

--
-- Tablo için indeksler `project_vehicles`
--
ALTER TABLE `project_vehicles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_vehicles_project_id_foreign` (`project_id`),
  ADD KEY `project_vehicles_vehicle_id_foreign` (`vehicle_id`);

--
-- Tablo için indeksler `proposals`
--
ALTER TABLE `proposals`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `proposals_proposal_number_unique` (`proposal_number`),
  ADD KEY `proposals_contact_id_foreign` (`contact_id`),
  ADD KEY `proposals_prepared_by_foreign` (`prepared_by`),
  ADD KEY `proposals_approved_by_foreign` (`approved_by`),
  ADD KEY `proposals_subcontractor_id_foreign` (`subcontractor_id`),
  ADD KEY `proposals_parent_proposal_id_foreign` (`parent_proposal_id`);

--
-- Tablo için indeksler `proposal_documents`
--
ALTER TABLE `proposal_documents`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_documents_proposal_id_foreign` (`proposal_id`);

--
-- Tablo için indeksler `proposal_items`
--
ALTER TABLE `proposal_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_items_proposal_id_foreign` (`proposal_id`),
  ADD KEY `proposal_items_service_item_id_foreign` (`service_item_id`);

--
-- Tablo için indeksler `proposal_payment_item_templates`
--
ALTER TABLE `proposal_payment_item_templates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_payment_item_templates_phase_is_active_sort_order_index` (`phase`,`is_active`,`sort_order`);

--
-- Tablo için indeksler `proposal_payment_plan_items`
--
ALTER TABLE `proposal_payment_plan_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `ppp_proposal_phase_sort_unique` (`proposal_id`,`phase`,`sort_order`);

--
-- Tablo için indeksler `proposal_responsibilities`
--
ALTER TABLE `proposal_responsibilities`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `pr_proposal_sort_unique` (`proposal_id`,`sort_order`);

--
-- Tablo için indeksler `proposal_responsibility_templates`
--
ALTER TABLE `proposal_responsibility_templates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_responsibility_templates_is_active_sort_order_index` (`is_active`,`sort_order`);

--
-- Tablo için indeksler `proposal_revisions`
--
ALTER TABLE `proposal_revisions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_revisions_proposal_id_foreign` (`proposal_id`),
  ADD KEY `proposal_revisions_revised_by_foreign` (`revised_by`);

--
-- Tablo için indeksler `proposal_subcontractor_quotes`
--
ALTER TABLE `proposal_subcontractor_quotes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_subcontractor_quotes_proposal_id_foreign` (`proposal_id`),
  ADD KEY `proposal_subcontractor_quotes_contact_id_foreign` (`contact_id`),
  ADD KEY `proposal_subcontractor_quotes_created_by_foreign` (`created_by`);

--
-- Tablo için indeksler `proposal_subcontractor_quote_items`
--
ALTER TABLE `proposal_subcontractor_quote_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_subcontractor_quote_items_quote_id_foreign` (`quote_id`),
  ADD KEY `proposal_subcontractor_quote_items_service_item_id_foreign` (`service_item_id`);

--
-- Tablo için indeksler `proposal_templates`
--
ALTER TABLE `proposal_templates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_templates_created_by_foreign` (`created_by`);

--
-- Tablo için indeksler `proposal_template_items`
--
ALTER TABLE `proposal_template_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_template_items_proposal_template_id_foreign` (`proposal_template_id`),
  ADD KEY `proposal_template_items_service_item_id_foreign` (`service_item_id`);

--
-- Tablo için indeksler `proposal_template_payment_items`
--
ALTER TABLE `proposal_template_payment_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_template_payment_items_proposal_template_id_foreign` (`proposal_template_id`);

--
-- Tablo için indeksler `proposal_template_responsibilities`
--
ALTER TABLE `proposal_template_responsibilities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `proposal_template_responsibilities_proposal_template_id_foreign` (`proposal_template_id`);

--
-- Tablo için indeksler `purchase_orders`
--
ALTER TABLE `purchase_orders`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `purchase_orders_order_number_unique` (`order_number`),
  ADD KEY `purchase_orders_purchase_request_id_foreign` (`purchase_request_id`),
  ADD KEY `purchase_orders_contact_id_foreign` (`contact_id`),
  ADD KEY `purchase_orders_ordered_by_foreign` (`ordered_by`);

--
-- Tablo için indeksler `purchase_order_items`
--
ALTER TABLE `purchase_order_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchase_order_items_purchase_order_id_foreign` (`purchase_order_id`),
  ADD KEY `purchase_order_items_purchase_request_item_id_foreign` (`purchase_request_item_id`);

--
-- Tablo için indeksler `purchase_requests`
--
ALTER TABLE `purchase_requests`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `purchase_requests_request_number_unique` (`request_number`),
  ADD KEY `purchase_requests_requested_by_foreign` (`requested_by`),
  ADD KEY `purchase_requests_project_id_foreign` (`project_id`),
  ADD KEY `purchase_requests_department_id_foreign` (`department_id`),
  ADD KEY `purchase_requests_approved_by_foreign` (`approved_by`);

--
-- Tablo için indeksler `purchase_request_items`
--
ALTER TABLE `purchase_request_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchase_request_items_purchase_request_id_foreign` (`purchase_request_id`),
  ADD KEY `purchase_request_items_inventory_item_id_foreign` (`inventory_item_id`);

--
-- Tablo için indeksler `push_subscriptions`
--
ALTER TABLE `push_subscriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `push_subscriptions_user_id_index` (`user_id`);

--
-- Tablo için indeksler `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`);

--
-- Tablo için indeksler `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `role_has_permissions_role_id_foreign` (`role_id`);

--
-- Tablo için indeksler `service_categories`
--
ALTER TABLE `service_categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `service_categories_slug_unique` (`slug`);

--
-- Tablo için indeksler `service_items`
--
ALTER TABLE `service_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `service_items_code_unique` (`code`),
  ADD KEY `service_items_service_category_id_foreign` (`service_category_id`);

--
-- Tablo için indeksler `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Tablo için indeksler `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`key`);

--
-- Tablo için indeksler `siparisler`
--
ALTER TABLE `siparisler`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `siparisler_siparis_no_unique` (`siparis_no`),
  ADD KEY `siparisler_proposal_id_foreign` (`proposal_id`),
  ADD KEY `siparisler_created_by_foreign` (`created_by`),
  ADD KEY `siparisler_contact_id_status_index` (`contact_id`,`status`),
  ADD KEY `siparisler_project_id_index` (`project_id`),
  ADD KEY `siparisler_order_date_index` (`order_date`),
  ADD KEY `siparisler_subcontractor_quote_id_foreign` (`subcontractor_quote_id`),
  ADD KEY `siparisler_tip_index` (`tip`);

--
-- Tablo için indeksler `siparis_kalemleri`
--
ALTER TABLE `siparis_kalemleri`
  ADD PRIMARY KEY (`id`),
  ADD KEY `siparis_kalemleri_proposal_item_id_foreign` (`proposal_item_id`),
  ADD KEY `siparis_kalemleri_service_item_id_foreign` (`service_item_id`),
  ADD KEY `siparis_kalemleri_siparis_id_index` (`siparis_id`);

--
-- Tablo için indeksler `sondaj_field_plans`
--
ALTER TABLE `sondaj_field_plans`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `sondaj_field_plans_plan_number_unique` (`plan_number`),
  ADD KEY `sondaj_field_plans_created_by_foreign` (`created_by`),
  ADD KEY `sondaj_field_plans_scheduled_date_index` (`scheduled_date`),
  ADD KEY `sondaj_field_plans_project_id_scheduled_date_index` (`project_id`,`scheduled_date`);

--
-- Tablo için indeksler `sondaj_field_plan_personnel`
--
ALTER TABLE `sondaj_field_plan_personnel`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `sfp_personnel_unique` (`sondaj_field_plan_id`,`personnel_id`),
  ADD KEY `sondaj_field_plan_personnel_personnel_id_foreign` (`personnel_id`);

--
-- Tablo için indeksler `sondaj_field_plan_vehicles`
--
ALTER TABLE `sondaj_field_plan_vehicles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `sfp_vehicle_unique` (`sondaj_field_plan_id`,`vehicle_id`),
  ADD KEY `sondaj_field_plan_vehicles_vehicle_id_foreign` (`vehicle_id`);

--
-- Tablo için indeksler `sondaj_logs`
--
ALTER TABLE `sondaj_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sondaj_logs_project_id_foreign` (`project_id`),
  ADD KEY `sondaj_logs_submitted_by_foreign` (`submitted_by`),
  ADD KEY `sondaj_logs_reviewed_by_foreign` (`reviewed_by`);

--
-- Tablo için indeksler `sondaj_log_lab_assignments`
--
ALTER TABLE `sondaj_log_lab_assignments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sondaj_log_lab_assignments_sondaj_log_id_foreign` (`sondaj_log_id`),
  ADD KEY `sondaj_log_lab_assignments_sondaj_log_row_id_foreign` (`sondaj_log_row_id`),
  ADD KEY `sondaj_log_lab_assignments_lab_firm_id_foreign` (`lab_firm_id`);

--
-- Tablo için indeksler `sondaj_log_lab_assignment_tests`
--
ALTER TABLE `sondaj_log_lab_assignment_tests`
  ADD PRIMARY KEY (`id`),
  ADD KEY `slat_assignment_fk` (`sondaj_log_lab_assignment_id`),
  ADD KEY `slat_test_fk` (`lab_test_id`);

--
-- Tablo için indeksler `sondaj_log_rows`
--
ALTER TABLE `sondaj_log_rows`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sondaj_log_rows_sondaj_log_id_foreign` (`sondaj_log_id`);

--
-- Tablo için indeksler `subcontractor_quote_payment_items`
--
ALTER TABLE `subcontractor_quote_payment_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subcontractor_quote_payment_items_quote_id_foreign` (`quote_id`);

--
-- Tablo için indeksler `subcontractor_quote_responsibilities`
--
ALTER TABLE `subcontractor_quote_responsibilities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subcontractor_quote_responsibilities_quote_id_foreign` (`quote_id`);

--
-- Tablo için indeksler `subcontractor_responsibility_responses`
--
ALTER TABLE `subcontractor_responsibility_responses`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `srr_quote_resp_unique` (`quote_id`,`responsibility_id`),
  ADD KEY `subcontractor_responsibility_responses_responsibility_id_foreign` (`responsibility_id`);

--
-- Tablo için indeksler `teams`
--
ALTER TABLE `teams`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `teams_code_unique` (`code`),
  ADD KEY `teams_department_id_foreign` (`department_id`),
  ADD KEY `teams_leader_id_foreign` (`leader_id`);

--
-- Tablo için indeksler `team_members`
--
ALTER TABLE `team_members`
  ADD PRIMARY KEY (`id`),
  ADD KEY `team_members_team_id_is_current_index` (`team_id`,`is_current`),
  ADD KEY `team_members_user_id_is_current_index` (`user_id`,`is_current`);

--
-- Tablo için indeksler `tracked_devices`
--
ALTER TABLE `tracked_devices`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tracked_devices_token_unique` (`token`),
  ADD UNIQUE KEY `tracked_devices_device_number_unique` (`device_number`),
  ADD KEY `tracked_devices_assigned_user_id_foreign` (`assigned_user_id`),
  ADD KEY `tracked_devices_created_by_foreign` (`created_by`),
  ADD KEY `tracked_devices_is_active_last_seen_at_index` (`is_active`,`last_seen_at`);

--
-- Tablo için indeksler `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD UNIQUE KEY `users_username_unique` (`username`);

--
-- Tablo için indeksler `vehicles`
--
ALTER TABLE `vehicles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `vehicles_plate_number_unique` (`plate_number`),
  ADD UNIQUE KEY `vehicles_vehicle_number_unique` (`vehicle_number`),
  ADD KEY `vehicles_team_id_foreign` (`team_id`);

--
-- Tablo için indeksler `vehicle_documents`
--
ALTER TABLE `vehicle_documents`
  ADD PRIMARY KEY (`id`),
  ADD KEY `vehicle_documents_vehicle_id_foreign` (`vehicle_id`);

--
-- Tablo için indeksler `versions`
--
ALTER TABLE `versions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `versions_published_by_foreign` (`published_by`);

--
-- Tablo için indeksler `warehouses`
--
ALTER TABLE `warehouses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `warehouses_manager_id_foreign` (`manager_id`);

--
-- Dökümü yapılmış tablolar için AUTO_INCREMENT değeri
--

--
-- Tablo için AUTO_INCREMENT değeri `activity_logs`
--
ALTER TABLE `activity_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;

--
-- Tablo için AUTO_INCREMENT değeri `bordro_donemi`
--
ALTER TABLE `bordro_donemi`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `bordro_kalemleri`
--
ALTER TABLE `bordro_kalemleri`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `cari_entries`
--
ALTER TABLE `cari_entries`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `chat_messages`
--
ALTER TABLE `chat_messages`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `chat_rooms`
--
ALTER TABLE `chat_rooms`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `chat_room_members`
--
ALTER TABLE `chat_room_members`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `contacts`
--
ALTER TABLE `contacts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Tablo için AUTO_INCREMENT değeri `contact_addresses`
--
ALTER TABLE `contact_addresses`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `contact_notes`
--
ALTER TABLE `contact_notes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `departments`
--
ALTER TABLE `departments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- Tablo için AUTO_INCREMENT değeri `device_locations`
--
ALTER TABLE `device_locations`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `employees`
--
ALTER TABLE `employees`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `expert_reports`
--
ALTER TABLE `expert_reports`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `expert_report_photos`
--
ALTER TABLE `expert_report_photos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `faturalar`
--
ALTER TABLE `faturalar`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `fatura_kalemleri`
--
ALTER TABLE `fatura_kalemleri`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `field_data_entries`
--
ALTER TABLE `field_data_entries`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `field_plans`
--
ALTER TABLE `field_plans`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `field_plan_personnel`
--
ALTER TABLE `field_plan_personnel`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `field_plan_service_items`
--
ALTER TABLE `field_plan_service_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `field_plan_vehicles`
--
ALTER TABLE `field_plan_vehicles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `field_work_log_personnel`
--
ALTER TABLE `field_work_log_personnel`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `field_work_log_vehicles`
--
ALTER TABLE `field_work_log_vehicles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `hakedisler`
--
ALTER TABLE `hakedisler`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Tablo için AUTO_INCREMENT değeri `hakedis_kalemleri`
--
ALTER TABLE `hakedis_kalemleri`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Tablo için AUTO_INCREMENT değeri `harita_role_categories`
--
ALTER TABLE `harita_role_categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `harita_role_devices`
--
ALTER TABLE `harita_role_devices`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `inventory_categories`
--
ALTER TABLE `inventory_categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `inventory_items`
--
ALTER TABLE `inventory_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `inventory_movements`
--
ALTER TABLE `inventory_movements`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `izin_talepleri`
--
ALTER TABLE `izin_talepleri`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `izin_turleri`
--
ALTER TABLE `izin_turleri`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `jeofizik_field_plans`
--
ALTER TABLE `jeofizik_field_plans`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `jeofizik_field_plan_personnel`
--
ALTER TABLE `jeofizik_field_plan_personnel`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `jeofizik_field_plan_vehicles`
--
ALTER TABLE `jeofizik_field_plan_vehicles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `laboratory_samples`
--
ALTER TABLE `laboratory_samples`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `lab_firms`
--
ALTER TABLE `lab_firms`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Tablo için AUTO_INCREMENT değeri `lab_tests`
--
ALTER TABLE `lab_tests`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=136;

--
-- Tablo için AUTO_INCREMENT değeri `machines`
--
ALTER TABLE `machines`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `maintenance_parts`
--
ALTER TABLE `maintenance_parts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `maintenance_records`
--
ALTER TABLE `maintenance_records`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `maintenance_schedules`
--
ALTER TABLE `maintenance_schedules`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `map_pois`
--
ALTER TABLE `map_pois`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=126;

--
-- Tablo için AUTO_INCREMENT değeri `notification_logs`
--
ALTER TABLE `notification_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `notification_recipients`
--
ALTER TABLE `notification_recipients`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67;

--
-- Tablo için AUTO_INCREMENT değeri `personnel`
--
ALTER TABLE `personnel`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- Tablo için AUTO_INCREMENT değeri `personnel_documents`
--
ALTER TABLE `personnel_documents`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `poi_categories`
--
ALTER TABLE `poi_categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `projects`
--
ALTER TABLE `projects`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Tablo için AUTO_INCREMENT değeri `project_assignees`
--
ALTER TABLE `project_assignees`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `project_documents`
--
ALTER TABLE `project_documents`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `project_field_measurements`
--
ALTER TABLE `project_field_measurements`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `project_field_wells`
--
ALTER TABLE `project_field_wells`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `project_field_work_logs`
--
ALTER TABLE `project_field_work_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `project_machines`
--
ALTER TABLE `project_machines`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `project_notes`
--
ALTER TABLE `project_notes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `project_other_completions`
--
ALTER TABLE `project_other_completions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Tablo için AUTO_INCREMENT değeri `project_personnel`
--
ALTER TABLE `project_personnel`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `project_planned_geophysics`
--
ALTER TABLE `project_planned_geophysics`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Tablo için AUTO_INCREMENT değeri `project_planned_wells`
--
ALTER TABLE `project_planned_wells`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Tablo için AUTO_INCREMENT değeri `project_planned_works`
--
ALTER TABLE `project_planned_works`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Tablo için AUTO_INCREMENT değeri `project_progress_components`
--
ALTER TABLE `project_progress_components`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Tablo için AUTO_INCREMENT değeri `project_teams`
--
ALTER TABLE `project_teams`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `project_vehicles`
--
ALTER TABLE `project_vehicles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `proposals`
--
ALTER TABLE `proposals`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_documents`
--
ALTER TABLE `proposal_documents`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_items`
--
ALTER TABLE `proposal_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_payment_item_templates`
--
ALTER TABLE `proposal_payment_item_templates`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_payment_plan_items`
--
ALTER TABLE `proposal_payment_plan_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_responsibilities`
--
ALTER TABLE `proposal_responsibilities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_responsibility_templates`
--
ALTER TABLE `proposal_responsibility_templates`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_revisions`
--
ALTER TABLE `proposal_revisions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_subcontractor_quotes`
--
ALTER TABLE `proposal_subcontractor_quotes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_subcontractor_quote_items`
--
ALTER TABLE `proposal_subcontractor_quote_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_templates`
--
ALTER TABLE `proposal_templates`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_template_items`
--
ALTER TABLE `proposal_template_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_template_payment_items`
--
ALTER TABLE `proposal_template_payment_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `proposal_template_responsibilities`
--
ALTER TABLE `proposal_template_responsibilities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `purchase_orders`
--
ALTER TABLE `purchase_orders`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `purchase_order_items`
--
ALTER TABLE `purchase_order_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `purchase_requests`
--
ALTER TABLE `purchase_requests`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `purchase_request_items`
--
ALTER TABLE `purchase_request_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `push_subscriptions`
--
ALTER TABLE `push_subscriptions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- Tablo için AUTO_INCREMENT değeri `service_categories`
--
ALTER TABLE `service_categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Tablo için AUTO_INCREMENT değeri `service_items`
--
ALTER TABLE `service_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Tablo için AUTO_INCREMENT değeri `siparisler`
--
ALTER TABLE `siparisler`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Tablo için AUTO_INCREMENT değeri `siparis_kalemleri`
--
ALTER TABLE `siparis_kalemleri`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Tablo için AUTO_INCREMENT değeri `sondaj_field_plans`
--
ALTER TABLE `sondaj_field_plans`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `sondaj_field_plan_personnel`
--
ALTER TABLE `sondaj_field_plan_personnel`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `sondaj_field_plan_vehicles`
--
ALTER TABLE `sondaj_field_plan_vehicles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `sondaj_logs`
--
ALTER TABLE `sondaj_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `sondaj_log_lab_assignments`
--
ALTER TABLE `sondaj_log_lab_assignments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `sondaj_log_lab_assignment_tests`
--
ALTER TABLE `sondaj_log_lab_assignment_tests`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `sondaj_log_rows`
--
ALTER TABLE `sondaj_log_rows`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `subcontractor_quote_payment_items`
--
ALTER TABLE `subcontractor_quote_payment_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `subcontractor_quote_responsibilities`
--
ALTER TABLE `subcontractor_quote_responsibilities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `subcontractor_responsibility_responses`
--
ALTER TABLE `subcontractor_responsibility_responses`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `teams`
--
ALTER TABLE `teams`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- Tablo için AUTO_INCREMENT değeri `team_members`
--
ALTER TABLE `team_members`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `tracked_devices`
--
ALTER TABLE `tracked_devices`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;

--
-- Tablo için AUTO_INCREMENT değeri `vehicles`
--
ALTER TABLE `vehicles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `vehicle_documents`
--
ALTER TABLE `vehicle_documents`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `versions`
--
ALTER TABLE `versions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Tablo için AUTO_INCREMENT değeri `warehouses`
--
ALTER TABLE `warehouses`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Dökümü yapılmış tablolar için kısıtlamalar
--

--
-- Tablo kısıtlamaları `bordro_donemi`
--
ALTER TABLE `bordro_donemi`
  ADD CONSTRAINT `bordro_donemi_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`);

--
-- Tablo kısıtlamaları `bordro_kalemleri`
--
ALTER TABLE `bordro_kalemleri`
  ADD CONSTRAINT `bordro_kalemleri_bordro_donemi_id_foreign` FOREIGN KEY (`bordro_donemi_id`) REFERENCES `bordro_donemi` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bordro_kalemleri_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `cari_entries`
--
ALTER TABLE `cari_entries`
  ADD CONSTRAINT `cari_entries_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cari_entries_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `cari_entries_fatura_id_foreign` FOREIGN KEY (`fatura_id`) REFERENCES `faturalar` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `cari_entries_hakedis_id_foreign` FOREIGN KEY (`hakedis_id`) REFERENCES `hakedisler` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `cari_entries_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `chat_messages`
--
ALTER TABLE `chat_messages`
  ADD CONSTRAINT `chat_messages_chat_room_id_foreign` FOREIGN KEY (`chat_room_id`) REFERENCES `chat_rooms` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `chat_messages_reply_to_id_foreign` FOREIGN KEY (`reply_to_id`) REFERENCES `chat_messages` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `chat_messages_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `chat_rooms`
--
ALTER TABLE `chat_rooms`
  ADD CONSTRAINT `chat_rooms_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`);

--
-- Tablo kısıtlamaları `chat_room_members`
--
ALTER TABLE `chat_room_members`
  ADD CONSTRAINT `chat_room_members_chat_room_id_foreign` FOREIGN KEY (`chat_room_id`) REFERENCES `chat_rooms` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `chat_room_members_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `contact_addresses`
--
ALTER TABLE `contact_addresses`
  ADD CONSTRAINT `contact_addresses_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `contact_notes`
--
ALTER TABLE `contact_notes`
  ADD CONSTRAINT `contact_notes_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `contact_notes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `departments`
--
ALTER TABLE `departments`
  ADD CONSTRAINT `departments_manager_id_foreign` FOREIGN KEY (`manager_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `device_locations`
--
ALTER TABLE `device_locations`
  ADD CONSTRAINT `device_locations_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `tracked_devices` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `employees`
--
ALTER TABLE `employees`
  ADD CONSTRAINT `employees_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `employees_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `employees_personnel_id_foreign` FOREIGN KEY (`personnel_id`) REFERENCES `personnel` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `employees_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `expert_reports`
--
ALTER TABLE `expert_reports`
  ADD CONSTRAINT `expert_reports_reported_by_foreign` FOREIGN KEY (`reported_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `expert_report_photos`
--
ALTER TABLE `expert_report_photos`
  ADD CONSTRAINT `expert_report_photos_expert_report_id_foreign` FOREIGN KEY (`expert_report_id`) REFERENCES `expert_reports` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `faturalar`
--
ALTER TABLE `faturalar`
  ADD CONSTRAINT `faturalar_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `faturalar_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `faturalar_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `faturalar_hakedis_id_foreign` FOREIGN KEY (`hakedis_id`) REFERENCES `hakedisler` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `faturalar_proje_id_foreign` FOREIGN KEY (`proje_id`) REFERENCES `projects` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `fatura_kalemleri`
--
ALTER TABLE `fatura_kalemleri`
  ADD CONSTRAINT `fatura_kalemleri_fatura_id_foreign` FOREIGN KEY (`fatura_id`) REFERENCES `faturalar` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `field_data_entries`
--
ALTER TABLE `field_data_entries`
  ADD CONSTRAINT `field_data_entries_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `field_data_entries_reviewed_by_foreign` FOREIGN KEY (`reviewed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `field_data_entries_submitted_by_foreign` FOREIGN KEY (`submitted_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `field_plans`
--
ALTER TABLE `field_plans`
  ADD CONSTRAINT `field_plans_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `field_plans_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `field_plan_personnel`
--
ALTER TABLE `field_plan_personnel`
  ADD CONSTRAINT `field_plan_personnel_field_plan_id_foreign` FOREIGN KEY (`field_plan_id`) REFERENCES `field_plans` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `field_plan_personnel_personnel_id_foreign` FOREIGN KEY (`personnel_id`) REFERENCES `personnel` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `field_plan_service_items`
--
ALTER TABLE `field_plan_service_items`
  ADD CONSTRAINT `field_plan_service_items_field_plan_id_foreign` FOREIGN KEY (`field_plan_id`) REFERENCES `field_plans` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `field_plan_service_items_service_item_id_foreign` FOREIGN KEY (`service_item_id`) REFERENCES `service_items` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `field_plan_vehicles`
--
ALTER TABLE `field_plan_vehicles`
  ADD CONSTRAINT `field_plan_vehicles_field_plan_id_foreign` FOREIGN KEY (`field_plan_id`) REFERENCES `field_plans` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `field_plan_vehicles_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `field_work_log_personnel`
--
ALTER TABLE `field_work_log_personnel`
  ADD CONSTRAINT `field_work_log_personnel_field_work_log_id_foreign` FOREIGN KEY (`field_work_log_id`) REFERENCES `project_field_work_logs` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `field_work_log_personnel_personnel_id_foreign` FOREIGN KEY (`personnel_id`) REFERENCES `personnel` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `field_work_log_vehicles`
--
ALTER TABLE `field_work_log_vehicles`
  ADD CONSTRAINT `field_work_log_vehicles_field_work_log_id_foreign` FOREIGN KEY (`field_work_log_id`) REFERENCES `project_field_work_logs` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `field_work_log_vehicles_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `hakedisler`
--
ALTER TABLE `hakedisler`
  ADD CONSTRAINT `hakedisler_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `hakedisler_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `hakedisler_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `hakedisler_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `hakedisler_siparis_id_foreign` FOREIGN KEY (`siparis_id`) REFERENCES `siparisler` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `hakedis_kalemleri`
--
ALTER TABLE `hakedis_kalemleri`
  ADD CONSTRAINT `hakedis_kalemleri_hakedis_id_foreign` FOREIGN KEY (`hakedis_id`) REFERENCES `hakedisler` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `hakedis_kalemleri_service_item_id_foreign` FOREIGN KEY (`service_item_id`) REFERENCES `service_items` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `hakedis_kalemleri_siparis_kalem_id_foreign` FOREIGN KEY (`siparis_kalem_id`) REFERENCES `siparis_kalemleri` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `harita_role_categories`
--
ALTER TABLE `harita_role_categories`
  ADD CONSTRAINT `harita_role_categories_poi_category_id_foreign` FOREIGN KEY (`poi_category_id`) REFERENCES `poi_categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `harita_role_categories_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `harita_role_devices`
--
ALTER TABLE `harita_role_devices`
  ADD CONSTRAINT `harita_role_devices_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `harita_role_devices_tracked_device_id_foreign` FOREIGN KEY (`tracked_device_id`) REFERENCES `tracked_devices` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `inventory_categories`
--
ALTER TABLE `inventory_categories`
  ADD CONSTRAINT `inventory_categories_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `inventory_categories` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `inventory_items`
--
ALTER TABLE `inventory_items`
  ADD CONSTRAINT `inventory_items_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `inventory_categories` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `inventory_movements`
--
ALTER TABLE `inventory_movements`
  ADD CONSTRAINT `inventory_movements_inventory_item_id_foreign` FOREIGN KEY (`inventory_item_id`) REFERENCES `inventory_items` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `inventory_movements_moved_by_foreign` FOREIGN KEY (`moved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `inventory_movements_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `izin_talepleri`
--
ALTER TABLE `izin_talepleri`
  ADD CONSTRAINT `izin_talepleri_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `izin_talepleri_izin_turu_id_foreign` FOREIGN KEY (`izin_turu_id`) REFERENCES `izin_turleri` (`id`),
  ADD CONSTRAINT `izin_talepleri_onaylayan_id_foreign` FOREIGN KEY (`onaylayan_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `jeofizik_field_plans`
--
ALTER TABLE `jeofizik_field_plans`
  ADD CONSTRAINT `jeofizik_field_plans_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `jeofizik_field_plans_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `jeofizik_field_plan_personnel`
--
ALTER TABLE `jeofizik_field_plan_personnel`
  ADD CONSTRAINT `jeofizik_field_plan_personnel_jeofizik_field_plan_id_foreign` FOREIGN KEY (`jeofizik_field_plan_id`) REFERENCES `jeofizik_field_plans` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `jeofizik_field_plan_personnel_personnel_id_foreign` FOREIGN KEY (`personnel_id`) REFERENCES `personnel` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `jeofizik_field_plan_vehicles`
--
ALTER TABLE `jeofizik_field_plan_vehicles`
  ADD CONSTRAINT `jeofizik_field_plan_vehicles_jeofizik_field_plan_id_foreign` FOREIGN KEY (`jeofizik_field_plan_id`) REFERENCES `jeofizik_field_plans` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `jeofizik_field_plan_vehicles_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `laboratory_samples`
--
ALTER TABLE `laboratory_samples`
  ADD CONSTRAINT `laboratory_samples_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `lab_tests`
--
ALTER TABLE `lab_tests`
  ADD CONSTRAINT `lab_tests_lab_firm_id_foreign` FOREIGN KEY (`lab_firm_id`) REFERENCES `lab_firms` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `machines`
--
ALTER TABLE `machines`
  ADD CONSTRAINT `machines_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `machines_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `maintenance_parts`
--
ALTER TABLE `maintenance_parts`
  ADD CONSTRAINT `maintenance_parts_maintenance_record_id_foreign` FOREIGN KEY (`maintenance_record_id`) REFERENCES `maintenance_records` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `maintenance_records`
--
ALTER TABLE `maintenance_records`
  ADD CONSTRAINT `maintenance_records_assigned_to_foreign` FOREIGN KEY (`assigned_to`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `maintenance_records_reported_by_foreign` FOREIGN KEY (`reported_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `map_pois`
--
ALTER TABLE `map_pois`
  ADD CONSTRAINT `map_pois_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `poi_categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `map_pois_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `map_pois_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `notification_recipients`
--
ALTER TABLE `notification_recipients`
  ADD CONSTRAINT `notification_recipients_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `personnel`
--
ALTER TABLE `personnel`
  ADD CONSTRAINT `personnel_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `personnel_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `personnel_documents`
--
ALTER TABLE `personnel_documents`
  ADD CONSTRAINT `personnel_documents_personnel_id_foreign` FOREIGN KEY (`personnel_id`) REFERENCES `personnel` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `poi_categories`
--
ALTER TABLE `poi_categories`
  ADD CONSTRAINT `poi_categories_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `projects`
--
ALTER TABLE `projects`
  ADD CONSTRAINT `projects_civil_engineer_id_foreign` FOREIGN KEY (`civil_engineer_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_geology_engineer_id_foreign` FOREIGN KEY (`geology_engineer_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_geotechnical_engineer_id_foreign` FOREIGN KEY (`geotechnical_engineer_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_manager_id_foreign` FOREIGN KEY (`manager_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_project_responsible_id_foreign` FOREIGN KEY (`project_responsible_id`) REFERENCES `personnel` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_project_supervisor_id_foreign` FOREIGN KEY (`project_supervisor_id`) REFERENCES `personnel` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_subcontractor_id_foreign` FOREIGN KEY (`subcontractor_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_third_party_id_foreign` FOREIGN KEY (`third_party_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `project_assignees`
--
ALTER TABLE `project_assignees`
  ADD CONSTRAINT `project_assignees_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_assignees_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `project_documents`
--
ALTER TABLE `project_documents`
  ADD CONSTRAINT `project_documents_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_documents_uploaded_by_foreign` FOREIGN KEY (`uploaded_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `project_field_measurements`
--
ALTER TABLE `project_field_measurements`
  ADD CONSTRAINT `project_field_measurements_field_work_log_id_foreign` FOREIGN KEY (`field_work_log_id`) REFERENCES `project_field_work_logs` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_field_measurements_service_item_id_foreign` FOREIGN KEY (`service_item_id`) REFERENCES `service_items` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `project_field_wells`
--
ALTER TABLE `project_field_wells`
  ADD CONSTRAINT `project_field_wells_field_work_log_id_foreign` FOREIGN KEY (`field_work_log_id`) REFERENCES `project_field_work_logs` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_field_wells_service_item_id_foreign` FOREIGN KEY (`service_item_id`) REFERENCES `service_items` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `project_field_work_logs`
--
ALTER TABLE `project_field_work_logs`
  ADD CONSTRAINT `project_field_work_logs_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `project_field_work_logs_field_data_entry_id_foreign` FOREIGN KEY (`field_data_entry_id`) REFERENCES `field_data_entries` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `project_field_work_logs_machine_id_foreign` FOREIGN KEY (`machine_id`) REFERENCES `machines` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `project_field_work_logs_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_field_work_logs_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `project_field_work_logs_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `project_machines`
--
ALTER TABLE `project_machines`
  ADD CONSTRAINT `project_machines_machine_id_foreign` FOREIGN KEY (`machine_id`) REFERENCES `machines` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_machines_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `project_notes`
--
ALTER TABLE `project_notes`
  ADD CONSTRAINT `project_notes_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_notes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `project_other_completions`
--
ALTER TABLE `project_other_completions`
  ADD CONSTRAINT `project_other_completions_completed_by_foreign` FOREIGN KEY (`completed_by`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `project_other_completions_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_other_completions_project_planned_work_id_foreign` FOREIGN KEY (`project_planned_work_id`) REFERENCES `project_planned_works` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `project_personnel`
--
ALTER TABLE `project_personnel`
  ADD CONSTRAINT `project_personnel_personnel_id_foreign` FOREIGN KEY (`personnel_id`) REFERENCES `personnel` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_personnel_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `project_planned_geophysics`
--
ALTER TABLE `project_planned_geophysics`
  ADD CONSTRAINT `project_planned_geophysics_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `project_planned_wells`
--
ALTER TABLE `project_planned_wells`
  ADD CONSTRAINT `project_planned_wells_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `project_planned_works`
--
ALTER TABLE `project_planned_works`
  ADD CONSTRAINT `project_planned_works_completed_by_foreign` FOREIGN KEY (`completed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `project_planned_works_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_planned_works_proposal_item_id_foreign` FOREIGN KEY (`proposal_item_id`) REFERENCES `proposal_items` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `project_planned_works_service_item_id_foreign` FOREIGN KEY (`service_item_id`) REFERENCES `service_items` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `project_teams`
--
ALTER TABLE `project_teams`
  ADD CONSTRAINT `project_teams_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_teams_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `project_vehicles`
--
ALTER TABLE `project_vehicles`
  ADD CONSTRAINT `project_vehicles_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_vehicles_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `proposals`
--
ALTER TABLE `proposals`
  ADD CONSTRAINT `proposals_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `proposals_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `proposals_parent_proposal_id_foreign` FOREIGN KEY (`parent_proposal_id`) REFERENCES `proposals` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `proposals_prepared_by_foreign` FOREIGN KEY (`prepared_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `proposals_subcontractor_id_foreign` FOREIGN KEY (`subcontractor_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `proposal_documents`
--
ALTER TABLE `proposal_documents`
  ADD CONSTRAINT `proposal_documents_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `proposal_items`
--
ALTER TABLE `proposal_items`
  ADD CONSTRAINT `proposal_items_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `proposal_items_service_item_id_foreign` FOREIGN KEY (`service_item_id`) REFERENCES `service_items` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `proposal_payment_plan_items`
--
ALTER TABLE `proposal_payment_plan_items`
  ADD CONSTRAINT `proposal_payment_plan_items_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `proposal_responsibilities`
--
ALTER TABLE `proposal_responsibilities`
  ADD CONSTRAINT `proposal_responsibilities_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `proposal_revisions`
--
ALTER TABLE `proposal_revisions`
  ADD CONSTRAINT `proposal_revisions_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `proposal_revisions_revised_by_foreign` FOREIGN KEY (`revised_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `proposal_subcontractor_quotes`
--
ALTER TABLE `proposal_subcontractor_quotes`
  ADD CONSTRAINT `proposal_subcontractor_quotes_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `proposal_subcontractor_quotes_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `proposal_subcontractor_quotes_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `proposal_subcontractor_quote_items`
--
ALTER TABLE `proposal_subcontractor_quote_items`
  ADD CONSTRAINT `proposal_subcontractor_quote_items_quote_id_foreign` FOREIGN KEY (`quote_id`) REFERENCES `proposal_subcontractor_quotes` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `proposal_subcontractor_quote_items_service_item_id_foreign` FOREIGN KEY (`service_item_id`) REFERENCES `service_items` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `proposal_templates`
--
ALTER TABLE `proposal_templates`
  ADD CONSTRAINT `proposal_templates_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `proposal_template_items`
--
ALTER TABLE `proposal_template_items`
  ADD CONSTRAINT `proposal_template_items_proposal_template_id_foreign` FOREIGN KEY (`proposal_template_id`) REFERENCES `proposal_templates` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `proposal_template_items_service_item_id_foreign` FOREIGN KEY (`service_item_id`) REFERENCES `service_items` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `proposal_template_payment_items`
--
ALTER TABLE `proposal_template_payment_items`
  ADD CONSTRAINT `proposal_template_payment_items_proposal_template_id_foreign` FOREIGN KEY (`proposal_template_id`) REFERENCES `proposal_templates` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `proposal_template_responsibilities`
--
ALTER TABLE `proposal_template_responsibilities`
  ADD CONSTRAINT `proposal_template_responsibilities_proposal_template_id_foreign` FOREIGN KEY (`proposal_template_id`) REFERENCES `proposal_templates` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `purchase_orders`
--
ALTER TABLE `purchase_orders`
  ADD CONSTRAINT `purchase_orders_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `purchase_orders_ordered_by_foreign` FOREIGN KEY (`ordered_by`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `purchase_orders_purchase_request_id_foreign` FOREIGN KEY (`purchase_request_id`) REFERENCES `purchase_requests` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `purchase_order_items`
--
ALTER TABLE `purchase_order_items`
  ADD CONSTRAINT `purchase_order_items_purchase_order_id_foreign` FOREIGN KEY (`purchase_order_id`) REFERENCES `purchase_orders` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `purchase_order_items_purchase_request_item_id_foreign` FOREIGN KEY (`purchase_request_item_id`) REFERENCES `purchase_request_items` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `purchase_requests`
--
ALTER TABLE `purchase_requests`
  ADD CONSTRAINT `purchase_requests_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `purchase_requests_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `purchase_requests_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `purchase_requests_requested_by_foreign` FOREIGN KEY (`requested_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `purchase_request_items`
--
ALTER TABLE `purchase_request_items`
  ADD CONSTRAINT `purchase_request_items_inventory_item_id_foreign` FOREIGN KEY (`inventory_item_id`) REFERENCES `inventory_items` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `purchase_request_items_purchase_request_id_foreign` FOREIGN KEY (`purchase_request_id`) REFERENCES `purchase_requests` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `push_subscriptions`
--
ALTER TABLE `push_subscriptions`
  ADD CONSTRAINT `push_subscriptions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `service_items`
--
ALTER TABLE `service_items`
  ADD CONSTRAINT `service_items_service_category_id_foreign` FOREIGN KEY (`service_category_id`) REFERENCES `service_categories` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `siparisler`
--
ALTER TABLE `siparisler`
  ADD CONSTRAINT `siparisler_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `siparisler_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `siparisler_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `siparisler_proposal_id_foreign` FOREIGN KEY (`proposal_id`) REFERENCES `proposals` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `siparisler_subcontractor_quote_id_foreign` FOREIGN KEY (`subcontractor_quote_id`) REFERENCES `proposal_subcontractor_quotes` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `siparis_kalemleri`
--
ALTER TABLE `siparis_kalemleri`
  ADD CONSTRAINT `siparis_kalemleri_proposal_item_id_foreign` FOREIGN KEY (`proposal_item_id`) REFERENCES `proposal_items` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `siparis_kalemleri_service_item_id_foreign` FOREIGN KEY (`service_item_id`) REFERENCES `service_items` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `siparis_kalemleri_siparis_id_foreign` FOREIGN KEY (`siparis_id`) REFERENCES `siparisler` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `sondaj_field_plans`
--
ALTER TABLE `sondaj_field_plans`
  ADD CONSTRAINT `sondaj_field_plans_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sondaj_field_plans_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `sondaj_field_plan_personnel`
--
ALTER TABLE `sondaj_field_plan_personnel`
  ADD CONSTRAINT `sondaj_field_plan_personnel_personnel_id_foreign` FOREIGN KEY (`personnel_id`) REFERENCES `personnel` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sondaj_field_plan_personnel_sondaj_field_plan_id_foreign` FOREIGN KEY (`sondaj_field_plan_id`) REFERENCES `sondaj_field_plans` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `sondaj_field_plan_vehicles`
--
ALTER TABLE `sondaj_field_plan_vehicles`
  ADD CONSTRAINT `sondaj_field_plan_vehicles_sondaj_field_plan_id_foreign` FOREIGN KEY (`sondaj_field_plan_id`) REFERENCES `sondaj_field_plans` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sondaj_field_plan_vehicles_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `sondaj_logs`
--
ALTER TABLE `sondaj_logs`
  ADD CONSTRAINT `sondaj_logs_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sondaj_logs_reviewed_by_foreign` FOREIGN KEY (`reviewed_by`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `sondaj_logs_submitted_by_foreign` FOREIGN KEY (`submitted_by`) REFERENCES `users` (`id`);

--
-- Tablo kısıtlamaları `sondaj_log_lab_assignments`
--
ALTER TABLE `sondaj_log_lab_assignments`
  ADD CONSTRAINT `sondaj_log_lab_assignments_lab_firm_id_foreign` FOREIGN KEY (`lab_firm_id`) REFERENCES `lab_firms` (`id`),
  ADD CONSTRAINT `sondaj_log_lab_assignments_sondaj_log_id_foreign` FOREIGN KEY (`sondaj_log_id`) REFERENCES `sondaj_logs` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sondaj_log_lab_assignments_sondaj_log_row_id_foreign` FOREIGN KEY (`sondaj_log_row_id`) REFERENCES `sondaj_log_rows` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `sondaj_log_lab_assignment_tests`
--
ALTER TABLE `sondaj_log_lab_assignment_tests`
  ADD CONSTRAINT `slat_assignment_fk` FOREIGN KEY (`sondaj_log_lab_assignment_id`) REFERENCES `sondaj_log_lab_assignments` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `slat_test_fk` FOREIGN KEY (`lab_test_id`) REFERENCES `lab_tests` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `sondaj_log_rows`
--
ALTER TABLE `sondaj_log_rows`
  ADD CONSTRAINT `sondaj_log_rows_sondaj_log_id_foreign` FOREIGN KEY (`sondaj_log_id`) REFERENCES `sondaj_logs` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `subcontractor_quote_payment_items`
--
ALTER TABLE `subcontractor_quote_payment_items`
  ADD CONSTRAINT `subcontractor_quote_payment_items_quote_id_foreign` FOREIGN KEY (`quote_id`) REFERENCES `proposal_subcontractor_quotes` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `subcontractor_quote_responsibilities`
--
ALTER TABLE `subcontractor_quote_responsibilities`
  ADD CONSTRAINT `subcontractor_quote_responsibilities_quote_id_foreign` FOREIGN KEY (`quote_id`) REFERENCES `proposal_subcontractor_quotes` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `subcontractor_responsibility_responses`
--
ALTER TABLE `subcontractor_responsibility_responses`
  ADD CONSTRAINT `subcontractor_responsibility_responses_quote_id_foreign` FOREIGN KEY (`quote_id`) REFERENCES `proposal_subcontractor_quotes` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `subcontractor_responsibility_responses_responsibility_id_foreign` FOREIGN KEY (`responsibility_id`) REFERENCES `proposal_responsibilities` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `teams`
--
ALTER TABLE `teams`
  ADD CONSTRAINT `teams_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `teams_leader_id_foreign` FOREIGN KEY (`leader_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `team_members`
--
ALTER TABLE `team_members`
  ADD CONSTRAINT `team_members_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `team_members_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `tracked_devices`
--
ALTER TABLE `tracked_devices`
  ADD CONSTRAINT `tracked_devices_assigned_user_id_foreign` FOREIGN KEY (`assigned_user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tracked_devices_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `vehicles`
--
ALTER TABLE `vehicles`
  ADD CONSTRAINT `vehicles_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `vehicle_documents`
--
ALTER TABLE `vehicle_documents`
  ADD CONSTRAINT `vehicle_documents_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE CASCADE;

--
-- Tablo kısıtlamaları `versions`
--
ALTER TABLE `versions`
  ADD CONSTRAINT `versions_published_by_foreign` FOREIGN KEY (`published_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Tablo kısıtlamaları `warehouses`
--
ALTER TABLE `warehouses`
  ADD CONSTRAINT `warehouses_manager_id_foreign` FOREIGN KEY (`manager_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;
COMMIT;

/*!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 */;
