from django.contrib import admin
from .models import User, NotificationSettings

@admin.register(User)
class UserAdmin(admin.ModelAdmin):
    list_display = ('username', 'telegram_id', 'chat_id', 'role', 'confirmed')
    search_fields = ('username', 'telegram_id', 'chat_id')
    list_filter = ('role', 'confirmed')
    ordering = ('-id',)
    
   
@admin.register(NotificationSettings)
class NotificationSettingsAdmin(admin.ModelAdmin):
    list_display = ('user', 'email', 'telegram_enabled', 'email_enabled', 'notification_time')
    search_fields = ('user', 'email', 'telegram_enabled', 'email_enabled', 'notification_time')
    list_filter = ('user', 'email', 'telegram_enabled', 'email_enabled', 'notification_time')
    ordering = ('-id',)
    