from django.contrib import admin
from .models import ContactRequest


@admin.register(ContactRequest)
class ContactRequestAdmin(admin.ModelAdmin):
    list_display  = ['last_name', 'first_name', 'email', 'phone', 'created_at', 'is_read']
    list_filter   = ['is_read', 'created_at']
    search_fields = ['last_name', 'first_name', 'email', 'message']
    list_editable = ['is_read']
    readonly_fields = ['last_name', 'first_name', 'email', 'phone', 'message', 'created_at']
    ordering      = ['-created_at']

    def has_add_permission(self, request):
        return False
