Created
June 14, 2018 05:31
-
-
Save RadiationX/ae853d6b3eed0be83d42a02434458a6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChatResponse( | |
@SerializedName("chatId") val id: Long, // Очевидно | |
@SerializedName("count") val count: Int?, // Тоже в принципе | |
@SerializedName("lastMessage") val lastMessage: ChatMessageResponse?, // Последнее сообщение, используется в СПИСКЕ чатов. null в чате | |
@SerializedName("messages") val messages: List<ChatMessageResponse>?, // Сообщения в самом чате. null в списке чатов | |
@SerializedName("deletedIds") var deletedIds: List<Long>?, // Массив удаленных сообщений. Составляется относительно lastsync | |
@SerializedName("author") var author: UserResponse? // Юзер, автор чата | |
) | |
class ChatMessageResponse( | |
@SerializedName("localId") val localId: Long, // Это локальный айдишник сообщения, его просто нужно прокидывать | |
@SerializedName("id") val id: Long, // Очевидно | |
@SerializedName("contentType") val contentType: String, // Тип сообщения. text/image | |
@SerializedName("contentText") val contentText: String?, // Очевидно | |
@SerializedName("attachment") val attachment: MediaResponse?, // Очевидно | |
@SerializedName("date") val date: Date, // Дата сообщения | |
@SerializedName("user") val user: UserResponse // Автор сообщения | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment