[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Restructure DB tables related to trans
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Restructure DB tables related to transactions |
Date: |
Wed, 12 Aug 2020 13:06:17 +0200 |
This is an automated email from the git hooks/post-receive script.
heng-yeow pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new e7ad0b8 Restructure DB tables related to transactions
e7ad0b8 is described below
commit e7ad0b8e0cf93e7bf05048cc67cd651dce7c1e35
Author: tanhengyeow <E0032242@u.nus.edu>
AuthorDate: Wed Aug 12 19:06:01 2020 +0800
Restructure DB tables related to transactions
---
.../src/main/kotlin/tech/libeufin/sandbox/DB.kt | 23 +++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
index 7b54ef5..0631548 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
@@ -246,7 +246,7 @@ class EbicsUploadTransactionChunkEntity(id:
EntityID<String>) : Entity<String>(i
/**
* Table that keeps all the payments initiated by PAIN.001.
*/
-object PaymentsTable : Table() {
+object BankAccountTransactionsTable : IntIdTable() {
val creditorIban = text("creditorIban")
val creditorBic = text("creditorBic").nullable()
val creditorName = text("creditorName")
@@ -257,10 +257,23 @@ object PaymentsTable : Table() {
val amount = text("amount")
val currency = text("currency")
val date = long("date")
- val pmtInfId = text("pmtInfId")
- val msgId = text("msgId")
+ val subscriber = reference("pmtInfId", BankAccountsTable)
+}
- override val primaryKey = PrimaryKey(pmtInfId, msgId)
+class BankAccountTransactionsEntity(id: EntityID<Int>) : IntEntity(id) {
+ companion object :
IntEntityClass<BankAccountTransactionsEntity>(BankAccountTransactionsTable)
+
+ var creditorIban by BankAccountTransactionsTable.creditorIban
+ var creditorBic by BankAccountTransactionsTable.creditorBic
+ var creditorName by BankAccountTransactionsTable.creditorName
+ var debitorIban by BankAccountTransactionsTable.debitorIban
+ var debitorBic by BankAccountTransactionsTable.debitorBic
+ var debitorName by BankAccountTransactionsTable.debitorName
+ var subject by BankAccountTransactionsTable.subject
+ var amount by BankAccountTransactionsTable.amount
+ var currency by BankAccountTransactionsTable.currency
+ var date by BankAccountTransactionsTable.date
+ var subscriber by BankAccountEntity referencedOn
BankAccountTransactionsTable.subscriber
}
/**
@@ -297,7 +310,7 @@ fun dbCreateTables(dbName: String) {
EbicsUploadTransactionsTable,
EbicsUploadTransactionChunksTable,
EbicsOrderSignaturesTable,
- PaymentsTable,
+ BankAccountTransactionsTable,
BankAccountsTable
)
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Restructure DB tables related to transactions,
gnunet <=