from django.contrib import admin
from people.models import Person, PersonScrobble


@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
    date_hierarchy = "created"
    list_display = ("name", "bgg_username", "bgstats_id")
    raw_id_fields = ("user", "created_by")
    ordering = ("-created",)
    search_fields = ("name",)


@admin.register(PersonScrobble)
class PersonScrobbleAdmin(admin.ModelAdmin):
    list_display = ("person", "user", "scrobble", "created")
    list_filter = ("created",)
    ordering = ("-created",)
    raw_id_fields = ("person", "user", "scrobble")
