54 lines
1.2 KiB
Kotlin
54 lines
1.2 KiB
Kotlin
package com.racingapp.pitlog.model
|
|
|
|
enum class Corner(val short: String, val label: String) {
|
|
LF("LF", "Left front"),
|
|
RF("RF", "Right front"),
|
|
LR("LR", "Left rear"),
|
|
RR("RR", "Right rear"),
|
|
}
|
|
|
|
enum class Tread(val label: String) {
|
|
Inside("Inside"),
|
|
Middle("Middle"),
|
|
Outside("Outside"),
|
|
}
|
|
|
|
enum class SessionKind(val label: String) {
|
|
Practice("Practice"),
|
|
HotLaps("Hot laps"),
|
|
Qualifying("Qualifying"),
|
|
Heat("Heat"),
|
|
BMain("B-main"),
|
|
Feature("Feature"),
|
|
;
|
|
|
|
companion object {
|
|
fun fromLabel(value: String): SessionKind =
|
|
entries.firstOrNull { it.label.equals(value, ignoreCase = true) } ?: Practice
|
|
}
|
|
}
|
|
|
|
enum class Handling(val label: String) {
|
|
Tight("Tight"),
|
|
Neutral("Neutral"),
|
|
Loose("Loose"),
|
|
;
|
|
|
|
companion object {
|
|
fun fromLabel(value: String): Handling? =
|
|
entries.firstOrNull { it.label.equals(value, ignoreCase = true) }
|
|
}
|
|
}
|
|
|
|
enum class HandlingSpot(val label: String) {
|
|
Entry("Entry"),
|
|
Center("Center"),
|
|
Exit("Exit"),
|
|
;
|
|
|
|
companion object {
|
|
fun fromLabel(value: String): HandlingSpot? =
|
|
entries.firstOrNull { it.label.equals(value, ignoreCase = true) }
|
|
}
|
|
}
|