【发布时间】:2021-12-04 08:46:03
【问题描述】:
我无法为此数据库创建数据模型。
我无法列出与此模型的聊天记录。
data class ChatModel( var voice : String ?= null,
var sender : String ?= null,
)
示例 JSON
D/Log: DataSnapshot { key = J7AW1EgBx3cyP4eXfxYIBIfoT2J3, value =
{33447543={voice=https://firebasestorage.googleapis.com/v0/b/xxx.appspot.com/o/33447543.aac?alt=media&token=16e1f68b-2e2d-4c2b-976e-c30bdc38012d, chatwith=etcmobileapps, sender=mesut@gmail.com}, 32190281={voice=etcmobileapps.com, chatwith=etcmobileapps, sender=etcmobileap@gmail.com}} }
如果我删除 chatwith 值,聊天消息会出现在我的屏幕上,但不会与 chatwith 一起出现。
我需要聊天和聊天消息的数据类模型。
【问题讨论】:
-
现有数据模型有什么问题?