Added category to AccountTransactionEntity

This commit is contained in:
dankito 2024-08-27 21:01:33 +02:00
parent 8a7226661f
commit d75e8705ea
2 changed files with 6 additions and 5 deletions

View File

@ -37,7 +37,7 @@ class SqliteBankingRepository(
override fun getAllAccountTransactions(): List<AccountTransactionEntity> {
return accountTransactionQueries.selectAllTransactions { id, amount, currency, reference, bookingDate, valueDate, otherPartyName, otherPartyBankCode, otherPartyAccountId, bookingText, userSetDisplayName, notes, information, statementNumber, sequenceNumber, openingBalance, closingBalance, endToEndReference, customerReference, mandateReference, creditorIdentifier, originatorsIdentificationCode, compensationAmount, originalAmount, sepaReference, deviantOriginator, deviantRecipient, referenceWithNoSpecialType, primaNotaNumber, textKeySupplement, currencyType, bookingKey, referenceForTheAccountOwner, referenceOfTheAccountServicingInstitution, supplementaryDetails, transactionReferenceNumber, relatedReferenceNumber ->
return accountTransactionQueries.selectAllTransactions { id, amount, currency, reference, bookingDate, valueDate, otherPartyName, otherPartyBankCode, otherPartyAccountId, bookingText, userSetDisplayName, category, notes, information, statementNumber, sequenceNumber, openingBalance, closingBalance, endToEndReference, customerReference, mandateReference, creditorIdentifier, originatorsIdentificationCode, compensationAmount, originalAmount, sepaReference, deviantOriginator, deviantRecipient, referenceWithNoSpecialType, primaNotaNumber, textKeySupplement, currencyType, bookingKey, referenceForTheAccountOwner, referenceOfTheAccountServicingInstitution, supplementaryDetails, transactionReferenceNumber, relatedReferenceNumber ->
AccountTransactionEntity(
id,
Amount(amount), currency, reference,
@ -45,7 +45,7 @@ class SqliteBankingRepository(
otherPartyName, otherPartyBankCode, otherPartyAccountId,
bookingText,
userSetDisplayName, notes,
userSetDisplayName, category, notes,
information,
statementNumber?.toInt(), sequenceNumber?.toInt(),
@ -82,7 +82,7 @@ class SqliteBankingRepository(
transaction.otherPartyName, transaction.otherPartyBankCode, transaction.otherPartyAccountId,
transaction.bookingText,
transaction.userSetDisplayName, transaction.notes,
transaction.userSetDisplayName, null, transaction.notes, // TODO: add category to AccountTransaction
transaction.information,
transaction.statementNumber?.toLong(), transaction.sequenceNumber?.toLong(),

View File

@ -15,6 +15,7 @@ CREATE TABLE IF NOT EXISTS AccountTransaction (
bookingText TEXT,
userSetDisplayName TEXT,
category TEXT,
notes TEXT,
information TEXT,
@ -57,7 +58,7 @@ INSERT INTO AccountTransaction(
otherPartyName, otherPartyBankCode, otherPartyAccountId,
bookingText,
userSetDisplayName, notes,
userSetDisplayName, category, notes,
information,
statementNumber, sequenceNumber,
@ -83,7 +84,7 @@ VALUES(
?, ?, ?,
?,
?, ?,
?, ?, ?,
?,
?, ?,