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> { 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( AccountTransactionEntity(
id, id,
Amount(amount), currency, reference, Amount(amount), currency, reference,
@ -45,7 +45,7 @@ class SqliteBankingRepository(
otherPartyName, otherPartyBankCode, otherPartyAccountId, otherPartyName, otherPartyBankCode, otherPartyAccountId,
bookingText, bookingText,
userSetDisplayName, notes, userSetDisplayName, category, notes,
information, information,
statementNumber?.toInt(), sequenceNumber?.toInt(), statementNumber?.toInt(), sequenceNumber?.toInt(),
@ -82,7 +82,7 @@ class SqliteBankingRepository(
transaction.otherPartyName, transaction.otherPartyBankCode, transaction.otherPartyAccountId, transaction.otherPartyName, transaction.otherPartyBankCode, transaction.otherPartyAccountId,
transaction.bookingText, transaction.bookingText,
transaction.userSetDisplayName, transaction.notes, transaction.userSetDisplayName, null, transaction.notes, // TODO: add category to AccountTransaction
transaction.information, transaction.information,
transaction.statementNumber?.toLong(), transaction.sequenceNumber?.toLong(), transaction.statementNumber?.toLong(), transaction.sequenceNumber?.toLong(),

View File

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