Made displayName settable
This commit is contained in:
parent
959e527d12
commit
9c269ceb09
|
@ -40,9 +40,11 @@ open class BankAccount @JvmOverloads constructor(
|
||||||
open var technicalId: String = UUID.random()
|
open var technicalId: String = UUID.random()
|
||||||
|
|
||||||
|
|
||||||
|
open var userSetDisplayName: String? = null
|
||||||
|
|
||||||
open val displayName: String
|
open val displayName: String
|
||||||
get() {
|
get() {
|
||||||
return productName ?: subAccountNumber ?: identifier
|
return userSetDisplayName ?: productName ?: subAccountNumber ?: identifier
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,11 @@ open class Customer(
|
||||||
get() = tanMedia.sortedByDescending { it.status == TanMediumStatus.Used }
|
get() = tanMedia.sortedByDescending { it.status == TanMediumStatus.Used }
|
||||||
|
|
||||||
|
|
||||||
|
open var userSetDisplayName: String? = null
|
||||||
|
|
||||||
open val displayName: String
|
open val displayName: String
|
||||||
get() = bankName
|
get() = userSetDisplayName ?: bankName
|
||||||
|
|
||||||
|
|
||||||
open val balance: BigDecimal
|
open val balance: BigDecimal
|
||||||
get() = accounts.map { it.balance }.sum()
|
get() = accounts.map { it.balance }.sum()
|
||||||
|
|
Loading…
Reference in New Issue