Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
1.6 kB
2
Indexable
Never
data class Fac(val facId: Int, val facName: String, val facEvent: String, val selected: Boolean)

data class PriceRange(
    val id: Int,
    val table: String,
    val priceMin: List<String>,
    val priceMax: List<String>,
    val priceMinEvent: List<String>,
    val priceMaxEvent: List<String>
)

data class FilterKostJsonMock(
    val timeFacs: List<Fac>,
    val facs: List<Fac>,
    val otherFacs: List<Fac>,
    val priceRange: List<PriceRange>
)

fun getFilterKostJsonMock(): String {
    val filterKostJsonMock = FilterKostJsonMock(
        timeFacs = listOf(
            Fac(1, "fasilitas1", "event1", false),
            Fac(2, "fasilitas2", "event2", false),
            Fac(3, "fasilitas3", "event3", false)
        ),
        facs = listOf(
            Fac(1, "fasilitas1", "event1", false)
        ),
        otherFacs = listOf(
            Fac(133, "fasilitas1", "event1", false)
        ),
        priceRange = listOf(
            PriceRange(10085, "test1", listOf("1000", "2000"), listOf("5000", "10000"), listOf("1000", "2000"), listOf("5000", "10000")),
            PriceRange(10086, "test2", listOf("1000", "2000"), listOf("5000", "10000"), listOf("1000", "2000"), listOf("5000", "10000")),
            PriceRange(10087, "test3", listOf("1000", "2000"), listOf("5000", "10000"), listOf("1000", "2000"), listOf("5000", "10000")),
            PriceRange(10088, "test4", listOf("1000", "2000"), listOf("5000", "10000"), listOf("1000", "2000"), listOf("5000", "10000"))
        )
    )

    return Gson().toJson(filterKostJsonMock)
}
Leave a Comment