from rest_framework import serializers
from .models import Message

class MessageSerializer(serializers.ModelSerializer):
    """
    消息显示序列化器
    """
    class Meta:
        model = Message

        fields = ('uuid_id','sender','recipient','message','unread')

        read_only_fields = ('uuid_id', )


