models

package
v0.0.2-alpha4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Name string `json:"name" db:"name" arg:"-n,--name,required"`
}

func (*Category) FillDefaults

func (c *Category) FillDefaults(defaults *Category)

FillDefaults sets any zero values in the given Category to their default values based on the provided Defaults.

type CategoryList

type CategoryList []Category

func (CategoryList) WriteDot

func (categories CategoryList) WriteDot(wParam io.Writer) error

writes a dot node table to the writer

type FreezerItem

type FreezerItem struct {
	ID         uint      `json:"id" db:"id"`
	Date       time.Time `json:"date" db:"date" arg:"-d,--date"` // default to today
	Identifier string    `json:"identifier" db:"identifier" arg:"--identifier"`
	Amount     string    `json:"amount" db:"amount" arg:"-a,--amount,required"`
	Misc       string    `json:"misc" db:"misc" arg:"-m,--misc"`
	ItemName   string    `json:"item_name" db:"item_name" arg:"-n,--name,required"`
}

func (*FreezerItem) FillDefaults

func (fi *FreezerItem) FillDefaults(defaults *FreezerItem)

FillDefaults sets any zero values in the given FreezerItem to their default values based on the provided Defaults.

type FreezerItemList

type FreezerItemList []FreezerItem

func (FreezerItemList) WriteDot

func (items FreezerItemList) WriteDot(wParam io.Writer) error

writes a dot node table to the writer

type ItemType

type ItemType struct {
	Name         string `json:"name" db:"name" arg:"-n,--name,required"`
	CategoryName string `json:"category_name" db:"category_name" arg:"-c,--cat,required"`
}

func (*ItemType) FillDefaults

func (it *ItemType) FillDefaults(defaults *ItemType)

FillDefaults sets any zero values in the given ItemType to their default values based on the provided Defaults.

type ItemTypeList

type ItemTypeList []ItemType

func (ItemTypeList) WriteDot

func (items ItemTypeList) WriteDot(wParam io.Writer) error

writes a dot node table to the writer

Jump to

Keyboard shortcuts

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