"""This module holds the django admin models of the ``sync`` app."""

from django.contrib import admin

from .models import (
    ClientVersion,
    LocalServer,
    LocalServerConnection,
    ServerVersion,
    Update,
    Task
)


class LocalServerAdmin(admin.ModelAdmin):
    """Django admin model for the ``LocalServer`` model."""

    list_display = ('mac', 'currently_update', 'name')


class ConnectionAdmin(admin.ModelAdmin):
    """Django admin model for the ``Connection`` model."""

    list_display = ('local_server', 'date')


class TaskAdmin(admin.ModelAdmin):
    """Django admin model for the ``Task`` model."""

    list_display = ('path', 'done', 'date')


admin.site.register(Task, TaskAdmin)
admin.site.register(LocalServerConnection, ConnectionAdmin)
admin.site.register(LocalServer, LocalServerAdmin)
admin.site.register(ClientVersion)
admin.site.register(ServerVersion)
admin.site.register(Update)
