model

package
v0.0.0-...-b49271d Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: MIT 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 {
	Description string
	Items       []Item
	ItemCount   int
}

Category represents an item category, for example: Trousers

type Item

type Item struct {
	model.Base
	UserID           string
	Name             string
	Description      string
	Color            string
	Size             string
	Brand            string
	Price            float64
	Currency         string
	Category         string
	Season           string
	Formal           bool
	Quantity         int
	Starred          bool
	Code             string
	URL              string
	Material         string
	CareInstructions string

	Images  []ItemImage
	ImageID *string
}

Item represents a wardrobe item

func NewItemForm

func NewItemForm(r *http.Request) (*Item, error)

NewItemForm returns an item with values parsed from HTTP form

type ItemImage

type ItemImage struct {
	model.Image
	ItemID string
}

ItemImage represents an image of an item

type Outfit

type Outfit struct {
	model.Base
	UserID      string
	Name        string
	OutfitItems []OutfitItem
}

Outfit represents an outfit

func NewOutfitForm

func NewOutfitForm(r *http.Request) (*Outfit, error)

NewOutfitForm returns an outfit with values parsed from HTTP form

type OutfitItem

type OutfitItem struct {
	model.Base
	ItemID   string
	OutfitID string

	Item *Item
}

OutfitItem represents an item that belongs to an outfit

type WeightEntry

type WeightEntry struct {
	model.Base
	UserID string
	Value  float64
}

WeightEntry represents a weight measurement

func NewWeightEntryForm

func NewWeightEntryForm(r *http.Request) (*WeightEntry, error)

NewWeightEntryForm returns an item with values parsed from HTTP form

Jump to

Keyboard shortcuts

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