package com.yidianling.im.session.extension

import com.alibaba.fastjson.JSONObject

/**
 * Created by Ykai on 2021/11/12.
 *
 * 患者报道消息解析器
 */
class CustomAttachmentPatientCheckIn : CustomAttachment(CustomAttachmentType.TYPE_PATIENT_CHECK_IN) {

    private val USER_CONTENT = "userContent"

    var userContent: String? = null


    override fun parseData(data: JSONObject) {
        userContent = data.getString(USER_CONTENT)
    }

    override fun packData(): JSONObject {
        val data = JSONObject()
        data[USER_CONTENT] = userContent
        return data
    }
}