from django.contrib import admin
from hexwick.models import PlaidAccount, PlaidTransaction, PlaidUser


class PlaidAccountsInline(admin.TabularInline):
    model = PlaidAccount
    extra = 0


class PlaidTransactionsInline(admin.TabularInline):
    model = PlaidTransaction
    extra = 0


class PlaidAccountsAdmin(admin.ModelAdmin):
    fieldsets = [
        (None, {'fields': ['user']}),
    ]
    inlines = [PlaidAccountsInline]

admin.site.register(PlaidUser, PlaidAccountsAdmin)
