package de.krisenvorrat.app.domain.usecase

import de.krisenvorrat.app.data.db.entity.ItemEntity
import javax.inject.Inject

internal class CalculateTotalValueUseCase @Inject constructor() {

    operator fun invoke(items: List<ItemEntity>): Double {
        return items.sumOf { it.quantity * it.unitPrice }
    }
}
