2023-04-16 18:19:06 +02:00
|
|
|
package com.denizk0461.studip.model
|
|
|
|
|
|
2023-04-18 15:39:49 +02:00
|
|
|
import androidx.room.ColumnInfo
|
|
|
|
|
|
2023-04-23 11:57:03 +02:00
|
|
|
/**
|
|
|
|
|
* Entity that is constructed by combining instances of OfferItem.kt (itemId, title, price,
|
|
|
|
|
* dietaryPreferences), OfferCategory.kt (category, categoryId), OfferCanteen.kt (canteen,
|
|
|
|
|
* canteenId), and OfferDate.kt (date, dateId) to be used as a data type for a custom RecyclerView
|
|
|
|
|
* adapter class.
|
|
|
|
|
*
|
|
|
|
|
* @param itemId unique identifier of the item
|
|
|
|
|
* @param date date formatted as dd.MM.
|
|
|
|
|
* @param dateId ID of the corresponding OfferDate.kt instance
|
|
|
|
|
* @param category category text content of the item
|
|
|
|
|
* @param categoryId ID of the corresponding OfferCategory.kt instance
|
|
|
|
|
* @param canteen name of the canteen
|
|
|
|
|
* @param canteenId ID of the corresponding OfferCanteen.kt instance
|
|
|
|
|
* @param title text content of the individual canteen offer
|
|
|
|
|
* @param price students' price for the individual canteen offer
|
|
|
|
|
* @param dietaryPreferences dietary preferences used to filter for the user's needs - see
|
|
|
|
|
* DietaryPrefObject.kt
|
2023-04-23 20:33:17 +02:00
|
|
|
* @param allergens allergens and additives that are present in the item
|
2023-04-23 11:57:03 +02:00
|
|
|
*/
|
2023-04-16 18:19:06 +02:00
|
|
|
data class CanteenOffer(
|
2023-04-18 15:39:49 +02:00
|
|
|
val itemId: Int,
|
2023-04-16 18:19:06 +02:00
|
|
|
val date: String,
|
2023-04-17 14:19:06 +02:00
|
|
|
val dateId: Int,
|
2023-04-16 18:19:06 +02:00
|
|
|
val category: String,
|
2023-04-17 14:19:06 +02:00
|
|
|
val categoryId: Int,
|
|
|
|
|
val canteen: String,
|
|
|
|
|
val canteenId: Int,
|
2023-04-16 18:19:06 +02:00
|
|
|
val title: String,
|
2023-04-23 11:57:03 +02:00
|
|
|
val price: String,
|
2023-04-18 15:39:49 +02:00
|
|
|
@ColumnInfo(name = "dietary_preferences") val dietaryPreferences: String,
|
2023-04-23 20:33:17 +02:00
|
|
|
val allergens: String,
|
2023-04-16 18:19:06 +02:00
|
|
|
)
|