from django.contrib import admin
from .models import SmartModule, SmartPush


class SmartModuleAdmin(admin.ModelAdmin):
    list_display = ('name', 'desc', 'device_id', 'chip_id')
    list_filter = ('name', 'device_id', 'chip_id')
    ordering = ('name', 'device_id')


class SmartPushAdmin(admin.ModelAdmin):
    list_display = ('smart', 'signal', 'coordinate', 'time')
    list_filter = ('smart', 'time')
    ordering = ['time']


admin.site.register(SmartModule, SmartModuleAdmin)
admin.site.register(SmartPush, SmartPushAdmin)
