from django.contrib import admin
from .models import CarAuction, Bid

@admin.register(CarAuction)
class CarAuctionAdmin(admin.ModelAdmin):
    list_display = ('title', 'make', 'model', 'year', 'current_bid', 'end_date', 'seller')
    list_filter = ('make', 'year', 'end_date')
    search_fields = ('title', 'make', 'model', 'description')

@admin.register(Bid)
class BidAdmin(admin.ModelAdmin):
    list_display = ('auction', 'user', 'amount', 'created_at')
    list_filter = ('created_at',)