from django.contrib import admin
from .models import Domain, DomainTrafficDaily


@admin.register(Domain)
class DomainAdmin(admin.ModelAdmin):
    list_display = (
        'name', 'user', 'status', 'current_plan', 'edge_server_id', 'updated_at'
    )
    list_filter = ('status', 'current_plan')
    search_fields = ('name', 'user__username')


@admin.register(DomainTrafficDaily)
class DomainTrafficDailyAdmin(admin.ModelAdmin):
    list_display = ('domain', 'day', 'bytes', 'peak_bandwidth_mbps')
    list_filter = ('day',)

# Register your models here.
