package com.khmer9.cflivemain.remote

import com.gdtlib.lib.adapter.BaseListItem
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

@JsonClass(generateAdapter = true)
data class SubModuleResponse(
    @Json(name = "code")
    val resultCode: String,

    @Json(name = "message")
    val message: SubModuleMessage,

    @Json(name = "data")
    val data: List<SubModuleData>?
)

@JsonClass(generateAdapter = true)
data class SubModuleMessage(
    @Json(name = "code")
    val code: String,

    @Json(name = "descriptions")
    val description: String
)

@JsonClass(generateAdapter = true)
data class SubModuleData(
    @Json(name = "_id")
    val id: String,

    @Json(name = "order")
    val order: Int,

    @Json(name = "is_enable")
    val isEnable: Boolean,

    @Json(name = "is_reverse_result")
    val isReverseResult: Boolean,

    @Json(name = "name")
    val name: String,

    @Json(name = "desc")
    val desc: String,

    @Json(name = "front_player_link")
    val frontPlayerLink: String,

    @Json(name = "app_id")
    val appId: String,

    @Json(name = "large_icon")
    val largeIcon: String,

    @Json(name = "small_icon")
    val smallIcon: String,

    @Json(name = "background_icon")
    val backgroundIcon: String,

    ) : BaseListItem() {
    override fun getUnique(): String = id
}