Dosya Yapısı
Mevcut Dosyalar (Değiştirilecek)
DEĞİŞİKLİK
app/Models/User.php
Yeni alanlar: membership_type_id, device_limit, is_corporate, parent_user_id vb.
Yeni ilişkiler: subscription(), devices(), loginLogs(), children() (kurumsal için)
DEĞİŞİKLİK
app/Http/Controllers/Auth/AuthenticatedSessionController.php
Cihaz kontrolü, 2FA doğrulama, login log kaydı eklenecek
DEĞİŞİKLİK
app/Http/Controllers/Auth/RegisteredUserController.php
Email doğrulama ayarı, varsayılan üyelik tipi atama, kurumsal kod kontrolü
DEĞİŞİKLİK
config/session.php
Lifetime: 525600 (1 yıl), tenant bazlı ayarlanabilir
Mevcut Dosyalar (Kullanılacak)
MEVCUT
app/Http/Controllers/Auth/*.php
9 adet Auth controller mevcut (Email verification, Password reset vb.)
MEVCUT
Modules/Payment/app/Services/PayTRDirectService.php
PayTR entegrasyonu mevcut - Recurring payment için genişletilecek
MEVCUT
Modules/SettingManagement/*
Setting grup ve değer sistemi - Yeni gruplar eklenecek
Yeni Dosyalar
YENİ
app/Models/MembershipType.php
Üyelik tipi modeli
YENİ
app/Models/UserSubscription.php
Kullanıcı abonelik modeli
YENİ
app/Models/UserDevice.php
Kullanıcı cihaz modeli
YENİ
app/Models/LoginLog.php
Giriş kaydı modeli
YENİ
app/Services/Auth/DeviceService.php
Cihaz yönetimi, limit kontrolü, fingerprint
YENİ
app/Services/Auth/TwoFactorService.php
2FA SMS gönderimi ve doğrulama
YENİ
app/Services/Auth/SubscriptionService.php
Abonelik yönetimi, deneme süresi, yenileme
YENİ
app/Services/Auth/CorporateService.php
Kurumsal üyelik, alt hesap yönetimi
YENİ
app/Http/Middleware/CheckDeviceLimit.php
Cihaz limiti kontrol middleware
YENİ
app/Http/Middleware/CheckSubscription.php
Abonelik durumu kontrol middleware
SettingManagement Grupları
Mevcut Yapı: settings_groups tablosu mevcut.
Aşağıdaki gruplar yeni oluşturulacak ve JSON layout ile form alanları tanımlanacak.
auth_registration YENİ
registration_enabled
email_verification_required
admin_approval_required
default_membership_type
welcome_email_enabled
auth_session YENİ
session_lifetime
remember_me_lifetime
single_session_only
logout_on_password_change
auth_security YENİ
max_login_attempts
lockout_duration
password_reset_expiry
two_factor_enabled
device_limit_default
sms YENİ
sms_provider
sms_api_key
sms_api_secret
sms_sender_id
auth_subscription YENİ
paid_membership_enabled
trial_days
trial_add_to_subscription
renewal_reminder_days
auto_renew_default
grace_period_days
corporate YENİ
corporate_enabled
bulk_payment_enabled
corporate_discount_percentage
Migration Listesi
Her migration hem central hem tenant klasörüne oluşturulacak.
// Central & Tenant
2025_11_23_001_create_membership_types_table.php
2025_11_23_002_create_user_subscriptions_table.php
2025_11_23_003_create_user_devices_table.php
2025_11_23_004_create_login_logs_table.php
2025_11_23_005_add_membership_fields_to_users_table.php
// Coupon Module (Modules/Coupon/database/migrations/tenant/)
2025_11_23_001_create_coupons_table.php
2025_11_23_002_create_coupon_usages_table.php