Added displayName to be able to replace shortcut `productName ?: identifier` in application

This commit is contained in:
dankito 2024-09-03 01:30:01 +02:00
parent aab562ccf4
commit c3c0b2830e
1 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package net.codinux.banking.client.model
import kotlinx.datetime.LocalDate import kotlinx.datetime.LocalDate
import kotlinx.datetime.LocalDateTime import kotlinx.datetime.LocalDateTime
import net.codinux.banking.client.model.config.JsonIgnore
import net.codinux.banking.client.model.config.NoArgConstructor import net.codinux.banking.client.model.config.NoArgConstructor
@NoArgConstructor @NoArgConstructor
@ -35,5 +36,9 @@ open class BankAccount(
var hideAccount: Boolean = false, var hideAccount: Boolean = false,
var includeInAutomaticAccountsUpdate: Boolean = true var includeInAutomaticAccountsUpdate: Boolean = true
) { ) {
@get:JsonIgnore
open val displayName: String
get() = productName ?: identifier
override fun toString() = "$type $identifier $productName (IBAN: $iban)" override fun toString() = "$type $identifier $productName (IBAN: $iban)"
} }