Archived
Added opening hours and a button for the user to view them, but the formatting sucks
This commit is contained in:
@@ -148,4 +148,12 @@ interface AppDAO {
|
||||
* @param item object to be saved to the database
|
||||
*/
|
||||
@Insert fun insert(item: OfferItem)
|
||||
|
||||
/**
|
||||
* Retrieves the opening hours of the canteen as a string.
|
||||
*
|
||||
* @return opening hours
|
||||
*/
|
||||
@Query("SELECT openingHours FROM offer_canteen LIMIT 1")
|
||||
fun getCanteenOpeningHours(): String
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import com.denizk0461.studip.model.*
|
||||
OfferCategory::class,
|
||||
OfferItem::class
|
||||
],
|
||||
version = 13,
|
||||
version = 14,
|
||||
)
|
||||
abstract class AppDatabase : RoomDatabase() {
|
||||
|
||||
|
||||
@@ -44,6 +44,13 @@ class AppRepository(app: Application) {
|
||||
*/
|
||||
fun nukeEvents() { dao.nukeEvents() }
|
||||
|
||||
/**
|
||||
* Retrieves the opening hours of the canteen as a string.
|
||||
*
|
||||
* @return opening hours
|
||||
*/
|
||||
fun getCanteenOpeningHours() = dao.getCanteenOpeningHours()
|
||||
|
||||
/**
|
||||
* Retrieves all canteen offers.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user