Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/data/gtfs/GtfsTrip.kt
Show All 18 Lines | |||||
import androidx.room.* | import androidx.room.* | ||||
@Entity(tableName = GtfsTrip.DB_TABLE, | @Entity(tableName = GtfsTrip.DB_TABLE, | ||||
foreignKeys=[ | foreignKeys=[ | ||||
ForeignKey(entity = GtfsRoute::class, | ForeignKey(entity = GtfsRoute::class, | ||||
parentColumns = [GtfsRoute.COL_ROUTE_ID], | parentColumns = [GtfsRoute.COL_ROUTE_ID], | ||||
childColumns = [GtfsTrip.COL_ROUTE_ID], | childColumns = [GtfsTrip.COL_ROUTE_ID], | ||||
onDelete = GtfsDatabase.FOREIGNKEY_ONDELETE), | onDelete = ForeignKey.CASCADE), | ||||
// The service_id: ID referencing calendar.service_id or calendar_dates.service_id | // The service_id: ID referencing calendar.service_id or calendar_dates.service_id | ||||
/* | /* | ||||
ForeignKey(entity = GtfsService::class, | ForeignKey(entity = GtfsService::class, | ||||
parentColumns = [GtfsService.COL_SERVICE_ID], | parentColumns = [GtfsService.COL_SERVICE_ID], | ||||
childColumns = [GtfsTrips.COL_SERVICE_ID], | childColumns = [GtfsTrips.COL_SERVICE_ID], | ||||
onDelete = GtfsDatabase.FOREIGNKEY_ONDELETE), | onDelete = GtfsDatabase.FOREIGNKEY_ONDELETE), | ||||
*/ | */ | ||||
], | ], | ||||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | companion object{ | ||||
} | } | ||||
*/ | */ | ||||
} | } | ||||
override fun getColumns(): Array<String> { | override fun getColumns(): Array<String> { | ||||
return COLUMNS | return COLUMNS | ||||
} | } | ||||
} | } | ||||
No newline at end of file | 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