from django.contrib import admin
from .models import ContactMessage, ProjectInquiry

@admin.register(ContactMessage)
class ContactMessageAdmin(admin.ModelAdmin):
    list_display = ('name', 'email', 'phone', 'company', 'service_interested', 'status', 'created_at')
    list_editable = ('status',)
    list_filter = ('status', 'service_interested', 'created_at')
    search_fields = ('name', 'email', 'company', 'subject', 'message')
    readonly_fields = ('created_at',)

@admin.register(ProjectInquiry)
class ProjectInquiryAdmin(admin.ModelAdmin):
    list_display = ('company', 'name', 'service', 'estimated_budget', 'timeline', 'status', 'created_at')
    list_editable = ('status',)
    list_filter = ('status', 'service', 'timeline')
    search_fields = ('company', 'name', 'email', 'phone', 'project_description', 'admin_notes')
    readonly_fields = ('created_at',)
