from django.contrib import admin
from .models import MockupProject, MockupResult

class MockupResultInline(admin.TabularInline):
    model = MockupResult
    extra = 0

@admin.register(MockupProject)
class MockupProjectAdmin(admin.ModelAdmin):
    list_display = ('title', 'user', 'status', 'created_at')
    list_filter = ('status', 'gender', 'body_type')
    search_fields = ('title', 'user__username')
    inlines = [MockupResultInline]

@admin.register(MockupResult)
class MockupResultAdmin(admin.ModelAdmin):
    list_display = ('project', 'view_type', 'created_at')