Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/data/gtfs/GtfsTrips.kt
- This file was added.
package it.reyboz.bustorino.data.gtfs | |||||
import android.content.ContentValues | |||||
import androidx.room.ColumnInfo | |||||
import androidx.room.Entity | |||||
import androidx.room.PrimaryKey | |||||
@Entity(tableName = GtfsTrips.DB_TABLE) | |||||
data class GtfsTrips( | |||||
@ColumnInfo(name = COL_ROUTE_ID ) | |||||
val routeID: String, | |||||
@ColumnInfo(name = COL_SERVICE_ID) | |||||
val serviceID: String, | |||||
@PrimaryKey | |||||
@ColumnInfo(name = COL_TRIP_ID) | |||||
val tripID: String, | |||||
@ColumnInfo(name = COL_HEADSIGN) | |||||
val tripHeadsign: String, | |||||
@ColumnInfo(name = COL_DIRECTION_ID) | |||||
val directionID: Int, | |||||
@ColumnInfo(name = COL_BLOCK_ID) | |||||
val blockID: String, | |||||
@ColumnInfo(name = COL_SHAPE_ID) | |||||
val shapeID: String, | |||||
@ColumnInfo(name = COL_WHEELCHAIR) | |||||
val isWheelchairAccess: Boolean, | |||||
@ColumnInfo(name = COL_LIMITED_R) | |||||
val isLimitedRoute: Boolean, | |||||
){ | |||||
companion object{ | |||||
const val DB_TABLE="gtfs_trips" | |||||
const val COL_ROUTE_ID="route_id" | |||||
const val COL_SERVICE_ID="service_id" | |||||
const val COL_TRIP_ID = "trip_id" | |||||
const val COL_HEADSIGN="trip_headsign" | |||||
//const val COL_SHORT_NAME="trip_short_name", | |||||
const val COL_DIRECTION_ID="direction_id" | |||||
const val COL_BLOCK_ID="block_id" | |||||
const val COL_SHAPE_ID = "shape_id" | |||||
const val COL_WHEELCHAIR="wheelchair_accessible" | |||||
const val COL_LIMITED_R="limited_route" | |||||
val COLUMNS= arrayOf( | |||||
COL_ROUTE_ID, | |||||
COL_SERVICE_ID, | |||||
COL_TRIP_ID, | |||||
COL_HEADSIGN, | |||||
COL_DIRECTION_ID, | |||||
COL_BLOCK_ID, | |||||
COL_SHAPE_ID, | |||||
COL_WHEELCHAIR, | |||||
COL_LIMITED_R | |||||
) | |||||
/* | |||||
open fun fromContentValues(values: ContentValues) { | |||||
val tripItem = GtfsTrips(); | |||||
} | |||||
*/ | |||||
} | |||||
} | |||||
No newline at end of file |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register