libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit db3e71086c47654b0df31a10606223cb49661d3c
parent 62d04901d6d9ec98ea42bdf192fa7ed048a57dbc
Author: ms <ms@taler.net>
Date:   Tue, 29 Jun 2021 11:26:48 +0200

DB: making Ebics subscriber point at bank accounts.

This reverts the fashion of having bank accounts pointing
at Ebics subscribers.  This way, a bank account can be pointed
at by Ebics, or Web, or FinTS (, ..) utilizers without relying
on any polimorphism.

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt @@ -133,6 +133,9 @@ object EbicsSubscribersTable : IntIdTable() { val authenticationKey = reference("authorizationKey", EbicsSubscriberPublicKeysTable).nullable() val nextOrderID = integer("nextOrderID") val state = enumeration("state", SubscriberState::class) + // setting as nullable to integrate this change more seamlessly into the current + // implementation. Can be removed eventually. + val bankAccount = reference("bankAccount", BankAccountsTable).nullable() } class EbicsSubscriberEntity(id: EntityID<Int>) : IntEntity(id) { @@ -147,6 +150,7 @@ class EbicsSubscriberEntity(id: EntityID<Int>) : IntEntity(id) { var authenticationKey by EbicsSubscriberPublicKeyEntity optionalReferencedOn EbicsSubscribersTable.authenticationKey var nextOrderID by EbicsSubscribersTable.nextOrderID var state by EbicsSubscribersTable.state + var bankAccount by BankAccountEntity optionalReferencedOn EbicsSubscribersTable.bankAccount } /** @@ -285,7 +289,6 @@ object BankAccountsTable : IntIdTable() { val bic = text("bic") val name = text("name") val label = text("label").uniqueIndex("accountLabelIndex") - val subscriber = reference("subscriber", EbicsSubscribersTable) val currency = text("currency") } @@ -296,7 +299,6 @@ class BankAccountEntity(id: EntityID<Int>) : IntEntity(id) { var bic by BankAccountsTable.bic var name by BankAccountsTable.name var label by BankAccountsTable.label - var subscriber by EbicsSubscriberEntity referencedOn BankAccountsTable.subscriber var currency by BankAccountsTable.currency }