from django.contrib import admin
from .models import Deal, Lead

@admin.register(Deal)
class DealAdmin(admin.ModelAdmin):
    list_display = ('title', 'deal_type', 'destination', 'current_price', 'is_published', 'created_at')
    list_filter = ('deal_type', 'is_published', 'created_at')
    search_fields = ('title', 'origin', 'destination', 'description')

@admin.register(Lead)
class LeadAdmin(admin.ModelAdmin):
    list_display = ('name', 'email', 'deal', 'created_at')
    list_filter = ('created_at',)
    search_fields = ('name', 'email', 'message')