mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 17:54:30 +08:00
code refactor
This commit is contained in:
@@ -4,8 +4,16 @@ import (
|
|||||||
"github.com/mayswind/ezbookkeeping/pkg/converters/datatable"
|
"github.com/mayswind/ezbookkeeping/pkg/converters/datatable"
|
||||||
"github.com/mayswind/ezbookkeeping/pkg/core"
|
"github.com/mayswind/ezbookkeeping/pkg/core"
|
||||||
"github.com/mayswind/ezbookkeeping/pkg/models"
|
"github.com/mayswind/ezbookkeeping/pkg/models"
|
||||||
|
"github.com/mayswind/ezbookkeeping/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var iifTransactionTypeNameMapping = map[models.TransactionType]string{
|
||||||
|
models.TRANSACTION_TYPE_MODIFY_BALANCE: utils.IntToString(int(models.TRANSACTION_TYPE_MODIFY_BALANCE)),
|
||||||
|
models.TRANSACTION_TYPE_INCOME: utils.IntToString(int(models.TRANSACTION_TYPE_INCOME)),
|
||||||
|
models.TRANSACTION_TYPE_EXPENSE: utils.IntToString(int(models.TRANSACTION_TYPE_EXPENSE)),
|
||||||
|
models.TRANSACTION_TYPE_TRANSFER: utils.IntToString(int(models.TRANSACTION_TYPE_TRANSFER)),
|
||||||
|
}
|
||||||
|
|
||||||
// iifTransactionDataFileImporter defines the structure of intuit interchange format (iif) for transaction data
|
// iifTransactionDataFileImporter defines the structure of intuit interchange format (iif) for transaction data
|
||||||
type iifTransactionDataFileImporter struct{}
|
type iifTransactionDataFileImporter struct{}
|
||||||
|
|
||||||
|
|||||||
@@ -41,13 +41,6 @@ var iifTransactionSupportedColumns = map[datatable.TransactionDataTableColumn]bo
|
|||||||
datatable.TRANSACTION_DATA_TABLE_DESCRIPTION: true,
|
datatable.TRANSACTION_DATA_TABLE_DESCRIPTION: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
var iifTransactionTypeNameMapping = map[models.TransactionType]string{
|
|
||||||
models.TRANSACTION_TYPE_MODIFY_BALANCE: utils.IntToString(int(models.TRANSACTION_TYPE_MODIFY_BALANCE)),
|
|
||||||
models.TRANSACTION_TYPE_INCOME: utils.IntToString(int(models.TRANSACTION_TYPE_INCOME)),
|
|
||||||
models.TRANSACTION_TYPE_EXPENSE: utils.IntToString(int(models.TRANSACTION_TYPE_EXPENSE)),
|
|
||||||
models.TRANSACTION_TYPE_TRANSFER: utils.IntToString(int(models.TRANSACTION_TYPE_TRANSFER)),
|
|
||||||
}
|
|
||||||
|
|
||||||
// iifTransactionDataTable defines the structure of intuit interchange format (iif) transaction data table
|
// iifTransactionDataTable defines the structure of intuit interchange format (iif) transaction data table
|
||||||
type iifTransactionDataTable struct {
|
type iifTransactionDataTable struct {
|
||||||
incomeAccountNames map[string]bool
|
incomeAccountNames map[string]bool
|
||||||
|
|||||||
Reference in New Issue
Block a user