from django.contrib import admin
from .models import UserProfile, LoginRecord


@admin.register(UserProfile)
class UserProfileAdmin(admin.ModelAdmin):
    list_display = ('user', 'display_name', 'contact_phone', 'default_free_traffic_gb_per_domain_override')
    search_fields = ('user__username', 'display_name', 'contact_phone')

# Register your models here.


@admin.register(LoginRecord)
class LoginRecordAdmin(admin.ModelAdmin):
    list_display = ('user', 'ip_address', 'created_at')
    search_fields = ('user__username', 'ip_address')
    list_filter = ('created_at',)
