from django.contrib import admin
from .models import Achievement, Proposal

@admin.register(Achievement)
class AchievementAdmin(admin.ModelAdmin):
    list_display = ('title', 'student_name', 'event_name', 'achievement_level', 'date')
    list_filter = ('date', 'achievement_level')
    search_fields = ('title', 'student_name', 'event_name')

@admin.register(Proposal)
class ProposalAdmin(admin.ModelAdmin):
    list_display = ('title', 'proposer_name', 'proposal_type', 'status', 'submitted_at')
    list_filter = ('status', 'proposal_type', 'submitted_at')
    search_fields = ('title', 'proposer_name')
    readonly_fields = ('submitted_at',)