models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnection

func GetConnection(config *types.Config) (*gorm.DB, *types.AppError)

Types

type Holiday

type Holiday struct {
	ID        int       `json:"id"`
	Name      string    `gorm:"not null;type:varchar(100)" json:"name"`
	Date      time.Time `gorm:"not null;unique_index;type:date" json:"date"`
	Type      int       `gorm:"not null" json:"type"`
	DayOfWeek int       `gorm:"not null" json:"day_of_week"`
}

func (Holiday) Map

func (h Holiday) Map(keys []string) (ret map[string]interface{})

func (Holiday) StringDate

func (h Holiday) StringDate() string

type Holidays

type Holidays []Holiday

func GetHolidayList

func GetHolidayList(holidays_ *Holidays, startDate *time.Time, endDate *time.Time) (holiday_list Holidays)

func (Holidays) Len

func (h Holidays) Len() int

func (Holidays) Less

func (h Holidays) Less(i, j int) bool

func (Holidays) Swap

func (h Holidays) Swap(i, j int)

Jump to

Keyboard shortcuts

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