Made displayName settable

This commit is contained in:
dankito 2020-08-08 18:10:11 +02:00
parent 959e527d12
commit 9c269ceb09
2 changed files with 7 additions and 2 deletions

View File

@ -40,9 +40,11 @@ open class BankAccount @JvmOverloads constructor(
open var technicalId: String = UUID.random()
open var userSetDisplayName: String? = null
open val displayName: String
get() {
return productName ?: subAccountNumber ?: identifier
return userSetDisplayName ?: productName ?: subAccountNumber ?: identifier
}

View File

@ -43,8 +43,11 @@ open class Customer(
get() = tanMedia.sortedByDescending { it.status == TanMediumStatus.Used }
open var userSetDisplayName: String? = null
open val displayName: String
get() = bankName
get() = userSetDisplayName ?: bankName
open val balance: BigDecimal
get() = accounts.map { it.balance }.sum()