from django.contrib import admin
from igny8_core.admin.base import AccountAdminMixin
from .models import OptimizationTask


@admin.register(OptimizationTask)
class OptimizationTaskAdmin(AccountAdminMixin, admin.ModelAdmin):
    list_display = ['content', 'account', 'status', 'credits_used', 'created_at']
    list_filter = ['status', 'created_at']
    search_fields = ['content__title', 'account__name']
    readonly_fields = ['created_at', 'updated_at']

