mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 23:17:33 +08:00
18 lines
707 B
Go
18 lines
707 B
Go
package converters
|
|
|
|
import (
|
|
"github.com/mayswind/ezbookkeeping/pkg/models"
|
|
)
|
|
|
|
// EzBookKeepingTSVFileExporter defines the structure of TSV file exporter
|
|
type EzBookKeepingTSVFileExporter struct {
|
|
EzBookKeepingPlainFileExporter
|
|
}
|
|
|
|
const tsvSeparator = "\t"
|
|
|
|
// ToExportedContent returns the exported TSV data
|
|
func (e *EzBookKeepingTSVFileExporter) ToExportedContent(uid int64, transactions []*models.Transaction, accountMap map[int64]*models.Account, categoryMap map[int64]*models.TransactionCategory, tagMap map[int64]*models.TransactionTag, allTagIndexes map[int64][]int64) ([]byte, error) {
|
|
return e.toExportedContent(uid, tsvSeparator, transactions, accountMap, categoryMap, tagMap, allTagIndexes)
|
|
}
|