use_cases

package
v0.0.0-...-4d895cd Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorPeriodAlreadyClosed = errors.New("period already closed")
	ErrorInvoiceNotPaid      = errors.New("invoice not paid")
)
View Source
var (
	ErrorTxDateOutOfRange = errors.New("transaction date out of range")
	ErrorTxNoAccounts     = errors.New("transaction must have at least one account")
)
View Source
var (
	CannotUpdateTxAtClosedPeriod = errors.New("cannot update transaction at closed period")
)
View Source
var (
	ErrCannotDeleteTxAtClosedPeriod = errors.New("cannot delete transaction at closed period")
)
View Source
var (
	ErrorCannotUpdateCurrencyInAccount = errors.New("cannot update currency in account")
)
View Source
var (
	ErrorCannotUpdateInvoiceAtClosedPeriod = errors.New("cannot update invoice at closed period")
)

Functions

This section is empty.

Types

type ContactImage

type ContactImage struct {
	Content     io.ReadSeeker
	Name        string
	Size        int64
	ContentType string
}

type ContactQRCode

type ContactQRCode struct {
	Image    ContactImage
	BankName string
}

type CreateAccountParams

type CreateAccountParams struct {
	Name        string
	Description *string
	Type        entities.AccountType
	Balance     currency.Amount
}

type CreateContactRequest

type CreateContactRequest struct {
	Name    string          `json:"name"`
	Text    string          `json:"text"`
	QRCodes []ContactQRCode `json:"qr_codes"`
}

type CreateInvoiceRequest

type CreateInvoiceRequest struct {
	Name        string
	Description *string

	Plan *entities.RepeatPlanner

	Type entities.InvoiceType

	Amount    currency.Amount
	ContactID uint64

	Date datetime.DateTime
}

type CreateTxRequest

type CreateTxRequest struct {
	Amount    currency.Amount
	FromID    *uint64
	ToID      *uint64
	Date      datetime.Date
	InvoiceID *uint64
}

type UpdateContactRequest

type UpdateContactRequest struct {
	ID   uint64
	Name string
	Text string
}

type UpdateInvoiceRequest

type UpdateInvoiceRequest struct {
	InvoiceID   uint64
	Name        string
	Description *string

	Plan *entities.RepeatPlanner

	Type      entities.InvoiceType
	Amount    currency.Amount
	ContactID uint64
	Date      datetime.DateTime
}

type UpdateTxRequest

type UpdateTxRequest struct {
	ID        uint64
	Date      datetime.Date
	Amount    currency.Amount
	FromID    *uint64
	ToID      *uint64
	InvoiceID *uint64
}

Jump to

Keyboard shortcuts

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