db

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectionMoney

func CollectionMoney(ctx context.Context) (*mongo.Collection, error)

func CollectionTime added in v1.2.0

func CollectionTime(ctx context.Context) (*mongo.Collection, error)

func CollectionTodo added in v1.0.5

func CollectionTodo(ctx context.Context) (*mongo.Collection, error)

Types

type Money

type Money struct {
	ID          primitive.ObjectID `bson:"_id" json:"id"`
	Amount      string             `bson:"amount" json:"amount"`
	Partner     string             `bson:"partner" json:"partner"`
	Currency    string             `bson:"currency" json:"currency"`
	Description string             `bson:"description" json:"description"`
	Group       *MoneyGroup        `bson:"group,omitempty" json:"group,omitempty"`
	Created     time.Time          `bson:"created" json:"created"`
}

type MoneyGroup

type MoneyGroup struct {
	ID      primitive.ObjectID `bson:"_id" json:"id"`
	Paid    bool               `bson:"paid" json:"paid"`
	Created time.Time          `bson:"created" json:"created"`
}

type Time added in v1.2.0

type Time struct {
	ID      primitive.ObjectID `bson:"_id" json:"id"`
	Project string             `bson:"project" json:"project"`
	Date    time.Time          `bson:"date" json:"date"`
	Items   []TimeItem         `bson:"items" json:"items"`
}

type TimeItem added in v1.2.0

type TimeItem struct {
	Start time.Time `bson:"start" json:"start"`
	End   time.Time `bson:"end" json:"end"`
}

type Todo added in v1.0.5

type Todo struct {
	ID          primitive.ObjectID `bson:"_id" json:"id"`
	Group       string             `bson:"group" json:"group"`
	Description string             `bson:"description" json:"description"`
	Priority    string             `bson:"priority" json:"priority"`
	Deadline    *time.Time         `bson:"deadline,omitempty" json:"deadline,omitempty"`
	FinishedAt  *time.Time         `bson:"finishedAt,omitempty" json:"finishedAt,omitempty"`
	Finished    bool               `bson:"finished" json:"finished"`
	Created     time.Time          `bson:"created" json:"created"`
}

Jump to

Keyboard shortcuts

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