from django.contrib import admin
from .models import Application, Vulnerability

@admin.register(Application)
class ApplicationAdmin(admin.ModelAdmin):
    list_display = ('name', 'version', 'vendor')
    search_fields = ('name', 'vendor')

@admin.register(Vulnerability)
class VulnerabilityAdmin(admin.ModelAdmin):
    list_display = ('cve_id', 'application', 'severity', 'status', 'discovered_at')
    list_filter = ('severity', 'status', 'application__name')
    search_fields = ('cve_id', 'description')