from django.contrib import admin
from .models import Hospital, DepartmentChief

@admin.register(Hospital)
class HospitalAdmin(admin.ModelAdmin):
    list_display = ('name', 'state', 'city')
    list_filter = ('state',)
    search_fields = ('name', 'city')

@admin.register(DepartmentChief)
class DepartmentChiefAdmin(admin.ModelAdmin):
    list_display = ('name', 'department', 'hospital', 'email')
    list_filter = ('department', 'hospital__state')
    search_fields = ('name', 'email', 'hospital__name')