from django.contrib import admin
from unfold.admin import ModelAdmin

from apps.geology.models import GalleryCategory, Gallery


@admin.register(GalleryCategory)
class GalleryCategoryAdmin(ModelAdmin):
    list_display = ("id", "name", "created_at", "updated_at")
    search_fields = ("name",)
    filter_horizontal = ("gallery",)
    list_filter = ("created_at", "updated_at")
    exclude = ("count",)


@admin.register(Gallery)
class GalleryAdmin(ModelAdmin):
    list_display = ("id", "name", "created_at", "updated_at")
    search_fields = ("name",)
    list_filter = ("created_at", "updated_at")
    exclude = ("type", "created_at", "updated_at", "name", "size")
