Oliver Rümpelein
d2dc84a17b
- You can now return "all" data available - The use of `Order.NAME_2` has been found and the item has been change to - `ORIGINAL_NAME` to reflect this - All `Order`-types now have their designated DSL method - It is now possible to search for items starting with a term - `inversion()` Order method has been renamed to `inversions()`
59 lines
2 KiB
Kotlin
59 lines
2 KiB
Kotlin
package de.pheerai.rcdbquery.dataMappings
|
|
|
|
import de.pheerai.rcdbquery.dsl.RcdbQueryParamsBuilder
|
|
|
|
@Suppress("unused")
|
|
enum class Order(
|
|
override val prettyName: String,
|
|
override val fullName: String,
|
|
override val paramValue: Int
|
|
) : RcdbParamOption<Int> {
|
|
IMAGES("Images", "Amount of Images", 0),
|
|
NAME("Name", "Name of the Coaster", 1),
|
|
ORIGINAL_NAME("Original Name", "Original name of the Coaster, in local charset", 2),
|
|
LOCATION("Location", 3),
|
|
PARK("Park", 4),
|
|
OPENED("Opened", "Opening Date", 8),
|
|
CLOSED("Closed", "Closing Date (past)", 9),
|
|
|
|
@Deprecated(
|
|
"This field seems to have been deprecated in favor of another parameter",
|
|
level = DeprecationLevel.WARNING,
|
|
replaceWith = ReplaceWith("Order.STATE")
|
|
)
|
|
STATE_2("State", "Operational State (legacy)", 10),
|
|
ENTERED("Entered", 12),
|
|
TYPE("Type", "Constrcution Type (Wood, Steel)", 13),
|
|
DESIGN("Design", "Train Design (Sit-Down, Invert,...)", 14),
|
|
CLASSIFICATION("Classification", "Coaster Classification (Coaster, Powered Coaster, Mountain Coaster)", 15),
|
|
LAYOUT("Layout", 16),
|
|
MODEL("Model", "Manufacturer Model", 17),
|
|
MODEL_LINE("Model-Line", "Coaster Model Line", 18),
|
|
SPEED("Speed", "Max. Speed", 19),
|
|
HEIGHT("Height", 20),
|
|
DROP("Drop", "Highest Drop", 21),
|
|
LENGTH("Length", 22),
|
|
ANGLE("Angle", 23),
|
|
INVERSIONS("Inversions", "Number of inversions", 24),
|
|
SERIAL_NO("Serial", "Serial number", 25),
|
|
SCALE("Scale", "Thrill factor", 26),
|
|
RIDE_TIME("Ride Time", 27),
|
|
STATE("State", "Operational state", 29),
|
|
MANUFACTURER("Manufacturer", 30),
|
|
CLOSING("Closing", "(Future) closign date for temporary installations", 31)
|
|
;
|
|
|
|
constructor(name: String, paramId: Int) : this(name, name, paramId)
|
|
|
|
companion object {
|
|
const val staticParamName = "order"
|
|
}
|
|
}
|
|
|
|
fun RcdbQueryParamsBuilder.sortBy(body: OrderBuilder.() -> OrderBuilder): RcdbQueryParamsBuilder {
|
|
val builder = OrderBuilder()
|
|
builder.body()
|
|
this[Order.staticParamName] = builder.build()
|
|
return this
|
|
}
|