models

package
v0.0.0-...-febf7be Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2017 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	// contains filtered or unexported fields
}

type Region

type Region struct {
	Base
}

func NewRegion

func NewRegion(db *sqlx.DB) *Region

func (*Region) Select

func (region *Region) Select(limit int, page int) ([]RegionRow, error)

type RegionRow

type RegionRow struct {
	ID         string `db:"id"`
	Name       string `db:"name"`
	Code       int    `db:"code"`
	CityCode   int    `db:"city_code"`
	CityName   string `db:"city_name"`
	CoverImage string `db:"cover_image"`
}

type Venue

type Venue struct {
	Base
}

func NewVenue

func NewVenue(db *sqlx.DB) *Venue

func (*Venue) Select

func (venue *Venue) Select(limit int, page int) ([]VenueRow, error)

type VenueRow

type VenueRow struct {
	ID            string  `db:"id"`
	No            int     `db:"no"`
	Name          string  `db:"name"`
	Address       string  `db:"address"`
	Tel           string  `db:"tel"`
	Lat           float64 `db:"lat"`
	Long          float64 `db:"long"`
	City          string  `db:"city"`
	Town          string  `db:"town"`
	HasOwnWifi    bool    `db:"has_own_wifi"`
	HasWiSpotter  bool    `db:"has_wispotter"`
	HasTtnetWifi  bool    `db:"has_ttnet_wifi"`
	HasAlcohol    bool    `db:"has_alcohol"`
	WifiRating    int     `db:"wifi_rating"`
	WifiAvgSpeed  float64 `db:"wifi_avg_speed"`
	PlugRating    int     `db:"plug_rating"`
	NoiseRating   int     `db:"noise_rating"`
	CoffeeRating  int     `db:"coffee_rating"`
	OverallRating float64 `db:"overall_rating"`
	SeatCapacity  int     `db:"seat_capacity"`
	TableCapacity int     `db:"table_capacity"`
	CoverImage    string  `db:"cover_image"`
}

Jump to

Keyboard shortcuts

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