# settings/admin.py

from django.contrib import admin
from .models import LocalDatabase, GlobalHotelSettings, GlobalSystemSettings, TelegramSettings, EmailSettings

@admin.register(LocalDatabase)
class LocalDatabaseAdmin(admin.ModelAdmin):
    list_display = ['name', 'host', 'port', 'user', 'database', 'is_active']
    search_fields = ['name', 'host','user', 'database']


admin.site.register(GlobalHotelSettings)
class GlobalHotelSettingsAdmin(admin.ModelAdmin):
    list_display = ['checkin_time', 'checkout_time', 'global_timezone']
    list_filter = ['global_timezone']
    
admin.site.register(GlobalSystemSettings)
class GlobalSystemSettingsAdmin(admin.ModelAdmin):
    list_display = ['system_name', 'system_version', 'server_timezone']
admin.site.register(TelegramSettings)
class TelegramSettingsAdmin(admin.ModelAdmin):
    list_display = ['bot_token', 'bot_username']
    
admin.site.register(EmailSettings)  # Register your models here.
class EmailSettingsAdmin(admin.ModelAdmin):
    list_display = ['email_host', 'email_port', 'email_host_user', 'email_host_password']