from django.contrib import admin
from .models import Brand, Incident

@admin.register(Brand)
class BrandAdmin(admin.ModelAdmin):
    list_display = ('name', 'website', 'created_at')
    search_fields = ('name',)

@admin.register(Incident)
class IncidentAdmin(admin.ModelAdmin):
    list_display = ('__str__', 'brand', 'status', 'reported_at')
    list_filter = ('status', 'incident_type', 'brand')
    search_fields = ('content', 'source_url')
    list_editable = ('status',)
    date_hierarchy = 'reported_at'