-- https://www.phpmyadmin.net/
--
-- Anamakine: localhost:3306
-- Üretim Zamanı: 06 Nis 2026, 11:08:23
-- Sunucu sürümü: 10.11.16-MariaDB-log
-- PHP Sürümü: 8.3.19

START TRANSACTION;



--
-- Veritabanı: `badamtechcom_muhasebe`
--

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

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

CREATE TABLE `cari_movements` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `cari_name` varchar(160) NOT NULL,
  `move_date` date NOT NULL,
  `move_type` enum('alacak','alacak_kisi','borc','odeme','odeme_cariye','odeme_bana','alis','satis') NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `adet` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `cari_movements` (`id`, `user_id`, `cari_name`, `move_date`, `move_type`, `description`, `amount`, `adet`, `created_at`) VALUES
(1, NULL, 'ES', '2026-03-13', 'borc', 'Cari açılış', 0.00, NULL, '2026-03-13 12:49:43'),
(3, 1, 'Lüks Moda', '2026-03-13', 'borc', 'Cari açılış', 14692.00, NULL, '2026-03-13 15:02:40'),
(40, 1, 'Yağmur Plastik', '2026-03-16', 'borc', '', 27410.00, NULL, '2026-03-16 13:41:41'),
(42, 1, 'Cemal Dikkaldırım', '2026-03-16', 'borc', '', 33351.00, NULL, '2026-03-16 13:55:03'),
(43, 1, 'Songül', '2026-03-16', 'odeme', '', 15000.00, NULL, '2026-03-16 20:21:02'),
(47, 1, 'Mustafa', '2026-03-17', '', '3\'Lü Çanta', 1150.00, 10, '2026-03-17 06:09:21'),
(48, 1, 'Mustafa', '2026-03-17', 'odeme', '', 6200.00, NULL, '2026-03-17 06:09:33'),
(51, 1, 'Lüks Moda', '2026-03-17', 'odeme', '', 5000.00, NULL, '2026-03-17 15:57:51'),
(52, 1, 'Mustafa', '2026-03-17', 'borc', '2\'li Kare', 990.00, 11, '2026-03-17 16:02:42'),
(54, 1, 'Yağmur Plastik', '2026-03-23', 'odeme', '', 5000.00, NULL, '2026-03-23 12:50:39'),
(55, 1, 'Lüks Moda', '2026-03-23', 'odeme', '', 5000.00, NULL, '2026-03-23 12:51:18'),
(56, 1, 'Mustafa', '2026-03-24', '', 'Çanta', 575.00, 5, '2026-03-24 10:18:17'),
(57, 1, 'Mustafa', '2026-03-24', '', 'Sandık', 450.00, 5, '2026-03-24 10:18:35'),
(58, 1, 'Mustafa', '2026-03-24', '', 'Takı', 225.00, 5, '2026-03-24 10:20:26'),
(59, 1, 'Mustafa', '2026-03-26', '', 'Çanta', 1150.00, 10, '2026-03-26 06:00:30'),
(60, 1, 'Mustafa', '2026-03-26', '', '2\'li', 900.00, 10, '2026-03-26 06:00:49'),
(61, 1, 'Mustafa', '2026-03-24', 'borc', 'Benzin', 60.00, NULL, '2026-03-26 06:01:59'),
(62, 1, 'Songül', '2026-03-26', 'odeme', '', 20000.00, NULL, '2026-03-26 11:02:22'),
(65, 1, 'Mustafa', '2026-03-27', 'odeme', 'Avans', 5000.00, NULL, '2026-03-30 05:47:15'),
(66, 1, 'Mustafa', '2026-03-27', 'borc', 'Çanta', 1150.00, NULL, '2026-03-30 05:47:40'),
(67, 1, 'Mustafa', '2026-03-27', 'borc', 'Takı', 225.00, NULL, '2026-03-30 05:48:06'),
(68, 1, 'Mustafa', '2026-03-27', 'borc', '2\'li Kare', 450.00, NULL, '2026-03-30 05:48:31'),
(72, 1, 'Mustafa', '2026-03-31', 'borc', '5 Takım', 1025.00, NULL, '2026-03-31 17:08:15'),
(74, 1, 'Mustafa', '2026-04-02', 'borc', 'Takı', 450.00, 10, '2026-04-02 17:22:33'),
(75, 1, 'Mustafa', '2026-04-02', 'borc', '2’li Kare', 450.00, 5, '2026-04-02 17:23:04'),
(77, 1, 'Mustafa', '2026-03-31', 'odeme', '', 1000.00, NULL, '2026-04-02 17:25:27'),
(78, 1, 'Mustafa', '2026-04-02', 'borc', 'Ödeme', 1725.00, NULL, '2026-04-02 17:26:00'),
(81, 1, 'Songül', '2026-04-02', 'odeme', '', 20000.00, NULL, '2026-04-02 17:38:34'),
(82, 1, 'Mustafa', '2026-04-03', 'borc', 'Ödeme', 540.00, NULL, '2026-04-03 14:37:07'),
(83, 1, 'Mustafa', '2026-04-03', 'borc', '3’lü Çanta', 575.00, 5, '2026-04-03 14:38:01'),
(84, 1, 'Mustafa', '2026-04-03', 'odeme', '', 5000.00, NULL, '2026-04-03 14:38:10'),
(87, 1, 'Mustafa', '2026-04-05', 'borc', '', 110.00, NULL, '2026-04-05 08:54:46'),
(89, 1, 'Mustafa', '2026-04-04', 'borc', '', 600.00, 6, '2026-04-05 13:54:16'),
(92, 1, 'Mustafa', '2026-04-05', 'borc', 'Kare', 800.00, 8, '2026-04-05 13:56:19'),
(93, 1, 'Mustafa', '2026-04-05', 'borc', 'Çanta', 1125.00, 9, '2026-04-05 13:58:05');

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

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

CREATE TABLE `expenses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `exp_date` date NOT NULL,
  `category_id` bigint(20) UNSIGNED NOT NULL,
  `note` varchar(255) DEFAULT NULL,
  `amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `scope` enum('personal','business') NOT NULL DEFAULT 'personal',
  `cari_name` varchar(160) DEFAULT NULL,
  `cari_type` enum('alacak','borc','odeme_cariye','odeme_bana') DEFAULT NULL,
  `adet` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `expenses` (`id`, `user_id`, `exp_date`, `category_id`, `note`, `amount`, `created_at`, `scope`, `cari_name`, `cari_type`, `adet`) VALUES
(5, 1, '2026-04-02', 6, '', 1555.00, '2026-03-16 06:31:48', 'personal', NULL, NULL, NULL),
(12, 1, '2026-04-02', 9, '', 796.00, '2026-03-16 19:08:30', 'personal', NULL, NULL, NULL),
(14, 1, '2026-04-05', 11, 'İş Elektrik', 708.00, '2026-03-16 20:31:36', 'business', NULL, NULL, NULL),
(16, 1, '2026-04-05', 24, '', 791.00, '2026-03-16 20:33:34', 'business', NULL, NULL, NULL),
(17, 1, '2026-04-02', 10, '', 177.00, '2026-03-16 20:34:06', 'personal', NULL, NULL, NULL),
(18, 1, '2026-04-02', 10, '', 307.00, '2026-03-16 20:34:17', 'personal', NULL, NULL, NULL),
(19, 1, '2026-03-18', 14, '', 228.00, '2026-03-18 15:55:36', 'personal', NULL, NULL, NULL),
(21, 1, '2026-04-05', 15, '', 150.00, '2026-03-18 15:56:08', 'personal', NULL, NULL, NULL),
(23, 1, '2026-03-19', 16, 'Garanti Para Çekme', 2500.00, '2026-03-20 04:09:05', 'personal', NULL, NULL, NULL),
(24, 1, '2026-04-05', 26, 'Makbul', 977.00, '2026-03-20 04:11:30', 'personal', NULL, NULL, NULL),
(25, 1, '2026-03-19', 15, '', 45.00, '2026-03-20 04:11:50', 'personal', NULL, NULL, NULL),
(26, 1, '2026-03-19', 14, '', 188.00, '2026-03-20 04:12:03', 'personal', NULL, NULL, NULL),
(27, 1, '2026-04-05', 26, 'EDEMEN', 3213.00, '2026-03-20 07:48:31', 'personal', NULL, NULL, NULL),
(29, 1, '2026-03-19', 7, '', 610.00, '2026-03-20 07:55:00', 'personal', NULL, NULL, NULL),
(31, 1, '2026-04-05', 5, '', 268.00, '2026-03-20 07:57:41', 'personal', NULL, NULL, NULL),
(33, 1, '2026-04-05', 26, 'Trendyol Tac', 762.00, '2026-03-20 08:05:50', 'personal', NULL, NULL, NULL),
(34, 1, '2026-04-05', 26, 'Tela', 4425.00, '2026-03-20 08:06:16', 'personal', NULL, NULL, NULL),
(40, 1, '2026-03-16', 29, '', 2500.00, '2026-03-23 13:50:05', 'business', NULL, NULL, NULL),
(41, 1, '2026-04-02', 23, '', 13000.00, '2026-03-23 13:58:58', 'business', NULL, NULL, NULL),
(42, 1, '2026-03-23', 16, 'Araba', 7000.00, '2026-03-24 10:25:31', 'personal', NULL, NULL, NULL),
(44, 1, '2026-03-26', 13, '', 1500.00, '2026-03-26 05:59:05', 'personal', NULL, NULL, NULL),
(45, 1, '2026-03-28', 26, 'CİCİM PASTANESİ', 935.00, '2026-03-30 05:41:25', 'personal', NULL, NULL, NULL),
(46, 1, '2026-03-28', 26, 'ETİKET', 347.85, '2026-03-30 05:41:40', 'personal', NULL, NULL, NULL),
(47, 1, '2026-03-28', 30, '', 8850.00, '2026-03-30 05:42:30', 'business', NULL, NULL, NULL),
(48, 1, '2026-03-29', 16, 'Araba Sigorta', 23425.00, '2026-03-30 05:45:10', 'personal', NULL, NULL, NULL),
(49, 1, '2026-03-28', 29, 'Koli', 1180.00, '2026-03-30 14:00:55', 'business', NULL, NULL, NULL),
(50, 1, '2026-04-03', 14, '', 436.00, '2026-04-03 15:25:11', 'personal', NULL, NULL, NULL),
(51, 1, '2026-04-03', 15, '', 70.00, '2026-04-03 15:25:16', 'personal', NULL, NULL, NULL),
(52, 1, '2026-04-04', 16, 'Süt', 120.00, '2026-04-04 17:23:42', 'personal', NULL, NULL, NULL),
(53, 1, '2026-04-04', 15, '', 70.00, '2026-04-04 17:23:56', 'personal', NULL, NULL, NULL),
(54, 1, '2026-03-31', 29, 'Vergi', 791.00, '2026-04-04 17:25:17', 'business', NULL, NULL, NULL),
(55, 1, '2026-04-01', 29, 'Vergi', 974.00, '2026-04-04 17:25:34', 'business', NULL, NULL, NULL),
(56, 1, '2026-04-04', 26, 'Trendyol Tac', 752.00, '2026-04-04 17:26:29', 'personal', NULL, NULL, NULL),
(57, 1, '2026-04-04', 10, '', 307.00, '2026-04-04 17:26:48', 'personal', NULL, NULL, NULL),
(58, 1, '2026-04-04', 5, '', 303.00, '2026-04-04 17:26:59', 'personal', NULL, NULL, NULL),
(59, 1, '2026-04-04', 14, '', 395.00, '2026-04-04 20:35:18', 'personal', NULL, NULL, NULL),
(60, 1, '2026-04-05', 16, 'Yemek', 500.00, '2026-04-05 17:18:32', 'personal', NULL, NULL, NULL);

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

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

CREATE TABLE `expense_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `name` varchar(100) NOT NULL,
  `icon` varchar(64) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `scope` enum('personal','business') NOT NULL DEFAULT 'personal',
  `kind` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `expense_categories` (`id`, `user_id`, `name`, `icon`, `created_at`, `scope`, `kind`) VALUES
(1, NULL, 'Doğalgaz', 'fa-fire-flame-curved', '2026-03-13 13:00:28', 'personal', 'Fatura'),
(2, NULL, 'Elektrik', 'fa-bolt', '2026-03-13 13:00:42', 'personal', 'Fatura'),
(3, NULL, 'Muhasebe', 'fa-briefcase', '2026-03-13 13:10:23', 'business', 'Gider'),
(4, NULL, 'Sünger', 'fa-tag', '2026-03-13 13:12:10', 'business', 'Gider'),
(5, 1, 'Elektrik', 'fa-bolt', '2026-03-13 14:57:51', 'personal', 'Fatura'),
(6, 1, 'Doğalgaz', 'fa-fire-flame-curved', '2026-03-13 14:58:22', 'personal', 'Fatura'),
(7, 1, 'Su', 'fa-droplet', '2026-03-13 14:58:42', 'personal', 'Fatura'),
(9, 1, 'İnternet', 'fa-wifi', '2026-03-16 05:58:37', 'personal', 'Fatura'),
(10, 1, 'Telefon', 'fa-phone', '2026-03-16 05:58:52', 'personal', 'Fatura'),
(11, 1, 'Elektrik', 'fa-bolt', '2026-03-16 05:59:19', 'business', 'Fatura'),
(12, 1, 'Su', 'fa-droplet', '2026-03-16 05:59:29', 'business', 'Fatura'),
(13, 1, 'Benzin', 'fa-gas-pump', '2026-03-16 06:01:28', 'personal', 'Akaryakıt'),
(14, 1, 'Market', 'fa-basket-shopping', '2026-03-16 06:02:20', 'personal', 'Gıda'),
(15, 1, 'Ekmek', 'fa-basket-shopping', '2026-03-16 06:02:39', 'personal', 'Gıda'),
(16, 1, 'Genel Harcamalar', 'fa-coins', '2026-03-16 06:03:11', 'personal', 'Diğer'),
(17, 1, 'Muhasebe', 'fa-file-invoice', '2026-03-16 06:05:42', 'business', 'Gider'),
(23, 1, 'Kira', 'fa-house', '2026-03-16 08:08:54', 'business', 'Gider'),
(24, 1, 'Vergi', 'fa-credit-card', '2026-03-16 20:33:16', 'business', 'Gider'),
(26, 1, 'Kredi Kartı', 'fa-credit-card', '2026-03-20 04:11:11', 'personal', 'Banka'),
(29, 1, 'Kredi Kartı', 'fa-credit-card', '2026-03-23 13:44:22', 'business', 'Kart'),
(30, 1, 'Sünger', 'fa-box', '2026-03-30 05:42:21', 'business', 'Gider');

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

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

CREATE TABLE `income_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `name` varchar(100) NOT NULL,
  `icon` varchar(64) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `income_categories` (`id`, `user_id`, `name`, `icon`, `created_at`) VALUES
(3, NULL, 'Trendyol', 'fa-circle-dollar-to-slot', '2026-03-13 09:48:25'),
(4, NULL, 'ELS MAAŞ', 'fa-coins', '2026-03-13 12:50:10'),
(5, 1, 'Trendyol', 'fa-sack-dollar', '2026-03-13 14:59:51'),
(6, 1, 'ELS MAAŞ', 'fa-coins', '2026-03-13 15:00:37'),
(7, 1, 'GARANTİ BANKASI', 'fa-credit-card', '2026-03-17 06:21:50'),
(9, 2, 'Staj', 'fa-briefcase', '2026-03-23 11:03:26'),
(10, 2, 'ArabanGo', 'fa-store', '2026-03-23 11:03:39'),
(11, 2, 'Spor', 'fa-coins', '2026-03-23 11:03:51'),
(12, 2, 'Bakım', 'fa-cart-shopping', '2026-03-23 11:04:01');

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

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

CREATE TABLE `income_entries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `inc_date` date NOT NULL,
  `category_id` bigint(20) UNSIGNED NOT NULL,
  `note` varchar(255) DEFAULT NULL,
  `amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `income_entries` (`id`, `user_id`, `inc_date`, `category_id`, `note`, `amount`, `created_at`) VALUES
(2, 1, '2026-03-16', 5, '', 17240.00, '2026-03-16 06:17:24'),
(3, 1, '2026-03-16', 5, '', 9418.00, '2026-03-16 06:25:38'),
(4, 1, '2026-03-16', 5, '', 637.00, '2026-03-16 19:05:05'),
(5, 1, '2026-03-16', 5, '', 12000.00, '2026-03-16 20:29:35'),
(7, 1, '2026-03-18', 5, '', 803.00, '2026-03-20 04:04:29'),
(8, 1, '2026-03-18', 5, '', 207.00, '2026-03-20 04:04:46'),
(9, 1, '2026-03-18', 5, '', 4543.00, '2026-03-20 04:04:55'),
(13, 1, '2026-03-07', 6, '', 3700.00, '2026-03-20 08:12:13'),
(14, 1, '2026-03-12', 6, '', 2700.00, '2026-03-20 08:12:40'),
(15, 1, '2026-03-23', 5, '', 19531.00, '2026-03-23 12:49:29'),
(16, 1, '2026-03-23', 5, '', 757.00, '2026-03-23 12:49:40'),
(17, 1, '2026-03-23', 5, '', 799.00, '2026-03-23 12:49:47'),
(18, 1, '2026-03-23', 5, '', 26871.00, '2026-03-23 13:30:03'),
(19, 1, '2026-03-25', 5, '', 818.00, '2026-03-25 12:12:38'),
(20, 1, '2026-03-26', 5, '', 6056.00, '2026-03-26 10:51:03'),
(21, 1, '2026-03-26', 5, '', 1735.00, '2026-03-26 10:51:12'),
(22, 1, '2026-03-26', 5, '', 9033.00, '2026-03-26 10:51:23'),
(23, 1, '2026-03-30', 5, '', 17153.00, '2026-03-30 09:41:07'),
(24, 1, '2026-03-30', 5, '', 6435.00, '2026-03-30 09:41:14'),
(25, 1, '2026-04-02', 5, '', 3331.00, '2026-04-02 17:20:03'),
(26, 1, '2026-04-02', 5, '', 11818.00, '2026-04-02 17:20:15'),
(27, 1, '2026-04-02', 5, '', 6070.00, '2026-04-02 17:20:32');

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

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

CREATE TABLE `transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tx_date` date NOT NULL,
  `tx_type` enum('gelen','giden') NOT NULL,
  `description` varchar(255) NOT NULL,
  `amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Tablo için indeksler `cari_movements`
--
ALTER TABLE `cari_movements`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_cari_name` (`cari_name`),
  ADD KEY `idx_cari_date` (`move_date`),
  ADD KEY `idx_cari_movements_user` (`user_id`);

--
-- Tablo için indeksler `expenses`
--
ALTER TABLE `expenses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_exp_cat` (`category_id`),
  ADD KEY `idx_expenses_scope_date` (`scope`,`exp_date`),
  ADD KEY `idx_expenses_cari_name` (`cari_name`),
  ADD KEY `idx_expenses_user` (`user_id`);

--
-- Tablo için indeksler `expense_categories`
--
ALTER TABLE `expense_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_expense_categories_scope` (`scope`),
  ADD KEY `idx_expense_categories_user` (`user_id`);

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

--
-- Tablo için indeksler `income_entries`
--
ALTER TABLE `income_entries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_inc_cat` (`category_id`),
  ADD KEY `idx_income_entries_user` (`user_id`);

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

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

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

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

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

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

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

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

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

--
-- Tablo kısıtlamaları `expenses`
--
ALTER TABLE `expenses`
  ADD CONSTRAINT `fk_exp_cat` FOREIGN KEY (`category_id`) REFERENCES `expense_categories` (`id`);

--
-- Tablo kısıtlamaları `income_entries`
--
ALTER TABLE `income_entries`
  ADD CONSTRAINT `fk_inc_cat` FOREIGN KEY (`category_id`) REFERENCES `income_categories` (`id`);
COMMIT;

