from osichat.models import *
from rest_framework import serializers


class VisitorSerializer(serializers.ModelSerializer):
    class Meta:
        model = Visitor
        fields = '__all__'


class ChatRoomGuestSerializer(serializers.ModelSerializer):
    visitor = VisitorSerializer()
    class Meta:
        model = ChatRoomGuest
        fields = '__all__'


class ChatMessageAttachement(serializers.ModelSerializer):
    class Meta:
        model = ChatMessageAttachment
        fields =  '__all__'


class ChatRoomSerializer(serializers.ModelSerializer):
    chatroomguest = ChatRoomGuestSerializer()
    class Meta:
        model = ChatRoom
        fields = '__all__'