from django.contrib import admin
from .models import Notification


@admin.register(Notification)
class NotificationAdmin(admin.ModelAdmin):
    list_display = ("id", "title", "notification_type", "user", "is_read", "bulk", "send_email", "created_at")
    list_filter = ("notification_type", "is_read", "bulk", "send_email", "created_at")
    search_fields = ("title", "text", "user__email", "user__username")
    ordering = ("-created_at",)
    readonly_fields = ("created_at", "read_at", "email_subject", "email_template_path", "send_email", "bulk")
