models

package
v0.0.0-...-ae9f1f3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2017 License: MIT Imports: 4 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 {
	gorm.Model

	Name string `gorm:"not null;unique"`
}

Category represents a single category.

type Expenditure

type Expenditure struct {
	gorm.Model

	Amount float64   `gorm:"not null"`
	Date   time.Time `gorm:"not null"`

	Category   *Category `gorm:"ForeignKey:CategoryID"`
	CategoryID uint
}

Expenditure represents a single expenditure.

type NullFloat64

type NullFloat64 struct {
	sql.NullFloat64
}

func (NullFloat64) MarshalJSON

func (v NullFloat64) MarshalJSON() ([]byte, error)

func (*NullFloat64) Set

func (v *NullFloat64) Set(data float64)

func (*NullFloat64) UnmarshalJSON

func (v *NullFloat64) UnmarshalJSON(data []byte) error

type NullInt64

type NullInt64 struct {
	sql.NullInt64
}

func (NullInt64) MarshalJSON

func (v NullInt64) MarshalJSON() ([]byte, error)

func (*NullInt64) Set

func (v *NullInt64) Set(data int64)

func (*NullInt64) UnmarshalJSON

func (v *NullInt64) UnmarshalJSON(data []byte) error

type NullString

type NullString struct {
	sql.NullString
}

func (NullString) MarshalJSON

func (v NullString) MarshalJSON() ([]byte, error)

func (*NullString) Set

func (v *NullString) Set(data string)

func (*NullString) UnmarshalJSON

func (v *NullString) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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