object @chat

attributes :id, :message, :user_id, :session_id, :created_at, :channel, :lesson_session_id, :purpose

node :user do |c|
    user_data = {}
    if c.user_id
        user_data[:name] = c.user.name
    end
    user_data
end

child :music_notation do
    attributes :id, :file_name, :attachment_type
end

child :claimed_recording do
    attributes :id, :name, :video_id
end
