from django.contrib import admin
from .models import MemberOfParliament, TradeDisclosure, Watchlist

@admin.register(MemberOfParliament)
class MemberOfParliamentAdmin(admin.ModelAdmin):
    list_display = ('name', 'party', 'constituency', 'province')
    search_fields = ('name', 'party', 'constituency')

@admin.register(TradeDisclosure)
class TradeDisclosureAdmin(admin.ModelAdmin):
    list_display = ('mp', 'ticker', 'trade_type', 'amount_range', 'disclosure_date')
    list_filter = ('trade_type', 'disclosure_date', 'mp__party')
    search_fields = ('ticker', 'company_name', 'mp__name')

@admin.register(Watchlist)
class WatchlistAdmin(admin.ModelAdmin):
    list_display = ('user', 'mp', 'ticker', 'created_at')