22 lines
742 B
Kotlin
22 lines
742 B
Kotlin
package com.example.busroute.Database
|
|
|
|
import android.provider.BaseColumns
|
|
|
|
object StopContract {
|
|
// Table contents are grouped together in an anonymous object.
|
|
object StopEntry : BaseColumns {
|
|
const val TABLE_NAME = "stop"
|
|
const val LATITUDE = "latitude"
|
|
const val LONGITUDE = "longitude"
|
|
const val ORDER = "'order'"
|
|
}
|
|
|
|
const val SQL_CREATE_ENTRIES =
|
|
"CREATE TABLE ${StopEntry.TABLE_NAME} (" +
|
|
"${BaseColumns._ID} INTEGER PRIMARY KEY," +
|
|
"${StopEntry.LATITUDE} DOUBLE, "+
|
|
"${StopEntry.LONGITUDE} DOUBLE, "+
|
|
"${StopEntry.ORDER} INTEGER)"
|
|
|
|
const val SQL_DELETE_ENTRIES = "DROP TABLE IF EXISTS ${StopEntry.TABLE_NAME}"
|
|
} |