from django.contrib import admin
from .models import Letter, Student

@admin.register(Letter)
class LetterAdmin(admin.ModelAdmin):
    list_display = ('letter_number', 'subject', 'type', 'date', 'sender_receiver')
    list_filter = ('type', 'date')
    search_fields = ('letter_number', 'subject', 'sender_receiver')

@admin.register(Student)
class StudentAdmin(admin.ModelAdmin):
    list_display = ('nisn', 'full_name', 'gender', 'is_active')
    list_filter = ('gender', 'is_active')
    search_fields = ('nisn', 'full_name')