Made properties overridable and variable

This commit is contained in:
dankito 2024-09-12 13:57:07 +02:00
parent a6b2ed8729
commit 8f822e9469
1 changed files with 13 additions and 13 deletions

View File

@ -7,45 +7,45 @@ import net.codinux.banking.client.model.config.NoArgConstructor
@NoArgConstructor
open class Holding(
val name: String,
open var name: String,
val isin: String? = null,
val wkn: String? = null,
open var isin: String? = null,
open var wkn: String? = null,
val quantity: Int? = null,
val currency: String? = null,
open var quantity: Int? = null,
open var currency: String? = null,
/**
* Gesamter Kurswert aller Einheiten des Wertpapiers
*/
val totalBalance: Amount? = null,
open var totalBalance: Amount? = null,
/**
* Aktueller Kurswert einer einzelnen Einheit des Wertpapiers
*/
val marketValue: Amount? = null,
open var marketValue: Amount? = null,
/**
* Änderung in Prozent Aktueller Kurswert gegenüber Einstandspreis.
*/
val performancePercentage: Float? = null,
open var performancePercentage: Float? = null,
/**
* Gesamter Einstandspreis (Kaufpreis)
*/
val totalCostPrice: Amount? = null,
open var totalCostPrice: Amount? = null,
/**
* (Durchschnittlicher) Einstandspreis/-kurs einer Einheit des Wertpapiers
*/
val averageCostPrice: Amount? = null,
open var averageCostPrice: Amount? = null,
/**
* Zeitpunkt zu dem der Kurswert bestimmt wurde
*/
val pricingTime: Instant? = null,
open var pricingTime: Instant? = null,
val buyingDate: LocalDate? = null,
open var buyingDate: LocalDate? = null,
) {
val identifier: String by lazy { "${isin}_$wkn" }
open val identifier: String by lazy { "${isin}_$wkn" }
override fun toString() = "$name $totalBalance $currency"
}