models

package
v0.0.0-...-1b50a0e Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2015 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	C_ACCOUNTS_NAME = "accounts"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	AccountAtom `bson:",inline"`
	Inverted    bool           `bson:"inverted,omitempty" json:"inverted,omitempty"`
	Minors      []AccountMinor `bson:"minors,omitempty" json:"minors,omitempty"`
}

type AccountAtom

type AccountAtom struct {
	Id    int    `bson:"_id" json:"id"`
	Name  string `bson:"name" json:"name"`
	Notes string `bson:"notes,omitempty" json:"notes,omitempty"`
}

type AccountMinor

type AccountMinor struct {
	AccountAtom `bson:",inline"`
	Inverted    bool          `bson:"inverted,omitempty" json:"inverted,omitempty"`
	Subs        []AccountAtom `bson:"subs,omitempty" json:"subs,omitempty"`
}

type AccountRef

type AccountRef struct {
	Major int `bson:"major" json:"major"`
	Minor int `bson:"minor" json:"minor"`
	Ref   int `bson:"ref" json:"ref"`
}

type Entry

type Entry struct {
	Id     bson.ObjectId   `bson:"_id,omitempty" json:"id,omitempty"`
	Debit  []EntrySide     `bson:"debit" json:"debit"`
	Credit []EntrySide     `bson:"credit" json:"credit"`
	Date   time.Time       `bson:"date" json:"date"`
	Value  int64           `bson:"value" json:"value"`
	Tags   []string        `bson:"tags" json:"tags"`
	Notes  string          `bson:"notes" json:"notes"`
	Files  []bson.ObjectId `bson:"files" json:"files"`
}

type EntrySide

type EntrySide struct {
	Account AccountRef `bson:"account" json:"account"`
	Value   int64      `bson:"value,omitempty" json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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