# -*- coding: utf-8 -*-

from django.contrib import admin

from message.models import SystemMessageDeleteInfo, SystemMessageInfo, SystemMessageReadInfo, UserMessageInfo


class UserMessageInfoAdmin(admin.ModelAdmin):
    list_display = ('from_uid', 'from_nickname', 'to_uid', 'group_id', 'photo_id', 'msg_type', 'read', 'status', 'created_at', 'updated_at')
    list_filter = ('msg_type', 'read', 'status')


class SystemMessageInfoAdmin(admin.ModelAdmin):
    list_display = ('title', 'content', 'url', 'src', 'status', 'created_at', 'updated_at')
    list_filter = ('src', 'status')


class SystemMessageReadInfoAdmin(admin.ModelAdmin):
    list_display = ('user_id', 'msg_id', 'status', 'created_at', 'updated_at')
    list_filter = ('status', )


class SystemMessageDeleteInfoAdmin(admin.ModelAdmin):
    list_display = ('user_id', 'msg_id', 'status', 'created_at', 'updated_at')
    list_filter = ('status', )


admin.site.register(UserMessageInfo, UserMessageInfoAdmin)
admin.site.register(SystemMessageInfo, SystemMessageInfoAdmin)
admin.site.register(SystemMessageReadInfo, SystemMessageReadInfoAdmin)
admin.site.register(SystemMessageDeleteInfo, SystemMessageDeleteInfoAdmin)
