Split AccountTransaction.userSetDisplayName into userSetReference and userSetOtherPartyName, and added userSetDisplayName to TanMedium, TanMethod and Holding

This commit is contained in:
dankito 2024-09-17 15:29:03 +02:00
parent 045774ff3f
commit 9af8d0eb1d
4 changed files with 16 additions and 9 deletions

View File

@ -124,7 +124,8 @@ open class AccountTransaction(
*/
val isReversal: Boolean = false,
var userSetDisplayName: String? = null,
var userSetReference: String? = null,
var userSetOtherPartyName: String? = null,
var category: String? = null,
var notes: String? = null,
) {

View File

@ -44,6 +44,8 @@ open class Holding(
open var pricingTime: Instant? = null,
open var buyingDate: LocalDate? = null,
var userSetDisplayName: String? = null,
) {
open val identifier: String by lazy { "${isin}_$wkn" }

View File

@ -14,7 +14,9 @@ open class TanMedium(
/**
* Only set if [type] is [TanMediumType.MobilePhone].
*/
val mobilePhone: MobilePhoneTanMedium? = null
val mobilePhone: MobilePhoneTanMedium? = null,
var userSetDisplayName: String? = null
) {
/**
@ -52,12 +54,13 @@ open class TanMedium(
}
val displayName: String by lazy {
identifier + " " + when (status) {
TanMediumStatus.Used -> "Aktiv"
TanMediumStatus.Available -> "Verfügbar"
TanMediumStatus.ActiveFollowUpCard -> " Folgekarte, aktiv bei erster Nutzung"
TanMediumStatus.AvailableFollowUpCard -> " Folgekarte, die erst aktiviert werden muss"
}
userSetDisplayName
?: (identifier + " " + when (status) {
TanMediumStatus.Used -> "Aktiv"
TanMediumStatus.Available -> "Verfügbar"
TanMediumStatus.ActiveFollowUpCard -> " Folgekarte, aktiv bei erster Nutzung"
TanMediumStatus.AvailableFollowUpCard -> " Folgekarte, die erst aktiviert werden muss"
})
}
override fun toString() = "$mediumName $status"

View File

@ -10,7 +10,8 @@ open class TanMethod(
open val type: TanMethodType,
open val identifier: String,
open val maxTanInputLength: Int? = null,
open val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric
open val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric,
open var userSetDisplayName: String? = null
) {
@get:JsonIgnore