models

package
v0.0.0-...-cdf6abf Latest Latest
Warning

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

Go to latest
Published: May 12, 2015 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDbMap

func GetDbMap() *gorp.DbMap

write get comments

func GetMealData

func GetMealData(dbMap *gorp.DbMap, meal string) string

func InsertFood

func InsertFood(dbMap *gorp.DbMap, food *Food) error

func StoreDailyData

func StoreDailyData(dbMap *gorp.DbMap)

Types

type Food

type Food struct {
	Id       int    //`db:"foodid"`
	Name     string //`db:"fname"`
	Hall     string //`db:"hall`
	Votes    int    //`db:"votes`
	Date     string //`db:"date`
	Meal     string //`db:"meal`
	Filters  string //'db:"filters
	Comments string //`comments`
}

func GetFoodByMeal

func GetFoodByMeal(dbMap *gorp.DbMap, meal string) (foods []*Food)

func VoteById

func VoteById(dbMap *gorp.DbMap, foodid int64, up bool) (food *Food)

type Halls

type Halls struct {
	Roma    Meals `json:"roma"`
	Wucox   Meals `json:"wucox"`
	Whitman Meals `json:"whitman"`
	Forbes  Meals `json:"forbes"`
	Grad    Meals `json:"grad"`
	CJL     Meals `json:"cjl"`
}

type Meals

type Meals struct {
	Breakfast []SFood `json:"Breakfast"`
	Lunch     []SFood `json:"Lunch"`
	Dinner    []SFood `json:"Dinner"`
}

type SFood

type SFood struct {
	Name string
	Filt []string
}

Jump to

Keyboard shortcuts

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