Skip to content

Instantly share code, notes, and snippets.

@MaxMyalkin
Last active September 12, 2017 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaxMyalkin/7675eb931117515b77537132934457dc to your computer and use it in GitHub Desktop.
Save MaxMyalkin/7675eb931117515b77537132934457dc to your computer and use it in GitHub Desktop.
//сообщение
@SerializedName("id")
val id: Int,
@SerializedName("text")
val text: String,
@SerializedName("user")
val user: UserModel,
@SerializedName("date")
val date: Long,
@SerializedName("roomId")
val chatId: Int,
@SerializedName("childId")
val childRoomId: Int,
@SerializedName("type")
val type: MessageType,
@SerializedName("teamId")
val teamId: Int = 0,
@SerializedName("questionInfo")
val questionInfo: QuestionInfoServer?
//questionInfoServer
val type: QuestionType,
val closeDate: Long,
val affectedCount: Int,
val description: String = "",
val commentCount: Int = 0,
val variants: List<Variant>,
val answers: QuestionServerAnswers?
class QuestionServerAnswers(
val my: Int?,
val poll: List<QuestionPoll>
)
class QuestionPoll(
var questionId: Int = 0,
var variantId: Int,
var count: Int
)
data class Variant(
var id: Int,
var type: String //positive/negative/neutral для вопросов да/нет/не ко мне
}
data class UserModel(
@SerializedName("email")
var email: String,
@SerializedName("id")
var id: Int,
@SerializedName("avatar")
var photo: AvatarModel,
@SerializedName("username")
var username: String,
@SerializedName("profile")
var profile: ProfileModel
)
data class ProfileModel(
@SerializedName("user_id")
var userId: Int,
@SerializedName("boss_id")
var boss_id: Int,
@SerializedName("firstName")
var firstName: String,
@SerializedName("lastName")
var lastName: String,
@SerializedName("avatarUrl")
var avatarUrl: String?,
@SerializedName("iosId")
var iosId: String?,
@SerializedName("droidId")
var droidId: String?,
@SerializedName("telegramUid")
var telegramUid: String?,
@SerializedName("telegramUser")
var telegramUser: String?,
@SerializedName("telegramPcid")
var telegramPcid: String?
)
class AvatarModel(
@SerializedName("32")
var small: String,
@SerializedName("64")
var medium: String,
@SerializedName("128")
var large: String,
@SerializedName("custom")
var custom: String
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment