database

package
v0.0.0-...-989e75f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionTypeUnknown          = TransactionType(0)
	TransactionTypeIncome           = TransactionType(1)
	TransactionTypeExpense          = TransactionType(2)
	TransactionTypeInternalTransfer = TransactionType(3)
	TransactionTypeRemoteTransfer   = TransactionType(4)
)
View Source
const (
	PrivatBank = TransactionSource("privatbank")
	Paribas    = TransactionSource("paribas")
	Revolut    = TransactionSource("revolut")
	Zen        = TransactionSource("zen")
	Mono       = TransactionSource("mono")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID          string     `json:"id"`
	CreatedAt   time.Time  `json:"createdAt"`
	ProcessedAt *time.Time `json:"processedAt"`
	IsProcessed bool       `json:"isProcessed"`
	Content     string     `json:"content"`
	FileID      string     `json:"fileId"`
	ChatID      int64      `json:"chatId"`
	MessageID   int64      `json:"messageId"`

	TransactionSource TransactionSource `json:"transactionSource"`
}

type Transaction

type Transaction struct {
	ID                string
	TransactionSource TransactionSource
	Type              TransactionType

	SourceAmount        decimal.Decimal
	SourceCurrency      string
	DestinationAmount   decimal.Decimal
	DestinationCurrency string

	Date               time.Time
	Description        string
	SourceAccount      string
	DestinationAccount string
	DateFromMessage    string
	Raw                string

	InternalTransferDirectionTo bool
	DuplicateTransactions       []*Transaction

	OriginalMessage  *Message `json:"-"`
	DeduplicationKey string

	OriginalTxType      string
	OriginalNadawcaName string
	ParsingError        error `json:"-"`
}

type TransactionSource

type TransactionSource string

type TransactionType

type TransactionType int32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL