Package eu.yeger.koffee.model.domain

Types

Entity
Link copied to clipboard
Interface used by database extension methods.
interface Entity
Item
Link copied to clipboard
Entity class representing Items.
data class Item(id: String,name: String,amount: Int?,price: Double) : Entity
ProfileImage
Link copied to clipboard
The profile image of a user.
class ProfileImage(encodedImage: String,timestamp: Long)
Transaction
Link copied to clipboard
Sealed class for all types of Transactions.
sealed class Transaction
TransactionList
Link copied to clipboard
Wrapper class necessary for preventing type erasure. Contains a list of Transactions.
class TransactionList(transactions: List<Transaction>) : List
User
Link copied to clipboard
Entity class representing Users.
data class User(id: String,name: String,transactions: TransactionList,isAdmin: Boolean,password: String?,profileImage: ProfileImage?) : Principal, Entity

Functions

asRefund
Link copied to clipboard
Extension method for turning Transaction.Purchases into Transaction.Refunds.
fun Transaction.Purchase.asRefund(): Transaction.Refund