Added opening hours and a button for the user to view them, but the formatting sucks

This commit is contained in:
denizk0461
2023-04-25 16:55:17 +02:00
parent 6b1d77dfb3
commit 65114264c4
13 changed files with 127 additions and 19 deletions
@@ -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.
*