io.github.wulkanowy.sdk.scrapper.grades.Grade.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-scrapper Show documentation
Show all versions of sdk-scrapper Show documentation
Unified way of retrieving data from the UONET+ register through mobile api and scraping api
package io.github.wulkanowy.sdk.scrapper.grades
import io.github.wulkanowy.sdk.scrapper.adapter.GradeDateDeserializer
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.Transient
import kotlinx.serialization.json.JsonNames
import java.time.LocalDate
@Serializable
@OptIn(ExperimentalSerializationApi::class)
data class Grade(
@SerialName("Wpis")
@JsonNames("wpis")
val entry: String = "",
@SerialName("KolorOceny") // dec
@JsonNames("kolorOceny")
val color: Int = -1,
@SerialName("KodKolumny")
val symbol: String? = "",
@SerialName("NazwaKolumny")
@JsonNames("nazwaKolumny")
val description: String? = "",
@SerialName("Waga")
@JsonNames("waga")
val weightValue: Double = .0,
@SerialName("DataOceny")
@JsonNames("dataOceny")
@Serializable(with = GradeDateDeserializer::class)
internal val privateDate: LocalDate,
@SerialName("Nauczyciel")
@JsonNames("nauczyciel")
val teacher: String = "",
) {
@Transient
var subject: String = ""
@Transient
var value: Int = 0
@Transient
var modifier: Double = .0
@Transient
var comment: String = ""
@Transient
var weight: String = ""
@Transient
var colorHex: String = ""
@Transient
lateinit var date: LocalDate
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy