from django.contrib import admin
from .models import Parcel

@admin.register(Parcel)
class ParcelAdmin(admin.ModelAdmin):
    list_display = ('tracking_number', 'sender_name', 'recipient_name', 'status', 'assignee_first_name', 'assignee_last_name', 'received_date')
    list_filter = ('status', 'assignee_first_name', 'assignee_last_name', 'received_date')
    search_fields = ('tracking_number', 'sender_name', 'recipient_name', 'sender_email', 'recipient_email', 'assignee_first_name', 'assignee_last_name')
    ordering = ('-received_date',)