1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- package com.sambath.kunkhmer.remote
- import com.squareup.moshi.Json
- import com.squareup.moshi.JsonClass
- @JsonClass(generateAdapter = true)
- data class MatchesResponse(
- @Json(name = "code")
- val resultCode: Int,
- @Json(name = "message")
- val message: ResponseMessage,
- @Json(name = "data")
- val data: MatchesData?
- )
- @JsonClass(generateAdapter = true)
- data class ResponseMessage(
- @Json(name = "code")
- val code: String,
- @Json(name = "description")
- val description: String = "NA",
- )
- @JsonClass(generateAdapter = true)
- data class MatchesData(
- @Json(name = "object")
- val obj: List<Matches>,
- )
- @JsonClass(generateAdapter = true)
- data class Matches(
- @Json(name = "_id")
- val matchInfo: MatchInfo,
- @Json(name = "fighters")
- val fighters: List<Fighters>,
- )
- @JsonClass(generateAdapter = true)
- data class MatchInfo(
- @Json(name = "_id")
- val id: String,
- @Json(name = "desc")
- val desc: String,
- @Json(name = "date")
- val date: String,
- @Json(name = "title")
- val title: String,
- @Json(name = "createdAt")
- val createdAt: String,
- )
- @JsonClass(generateAdapter = true)
- data class Fighters(
- @Json(name = "_id")
- val id: String,
- @Json(name = "name")
- val name: String,
- @Json(name = "desc")
- val desc: String,
- @Json(name = "weight")
- val weight: String,
- @Json(name = "high")
- val high: String,
- @Json(name = "nationality")
- val nationality: String,
- @Json(name = "filename")
- val filename: String,
- )
|