models

package
v0.0.0-...-83425ee Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConnectionSucess chan bool
View Source
var DB *gorm.DB

Functions

This section is empty.

Types

type List

type List struct {
	ID int `gorm:"AUTO_INCREMENT;PRIMARY_KEY;not null" json:"id"`

	BusinessType string `gorm:"unique;not null;" json:"business_type"`
	BusinessDesc string `json:"business_desc"`

	Interval  uint64 `gorm:"DEFAULT:10000;" sql:"type:bigint;" json:"interval"`
	StartedAt uint64 `gorm:"DEFAULT:1;" sql:"type:bigint;" json:"started_at"`
	EndedAT   uint64 `sql:"type:bigint;" json:"ended_at"`

	UpdatedAt time.Time
	CreatedAt time.Time

	Enable bool `gorm:"DEFAULT:1;" json:"enable"`
}

func GetAllList

func GetAllList() []*List

func GetAllListDisabled

func GetAllListDisabled() []*List

func (*List) BusinessId

func (l *List) BusinessId() string

func (*List) Duration

func (l *List) Duration() uint64

func (*List) EndAT

func (l *List) EndAT() uint64

func (*List) StartAt

func (l *List) StartAt() uint64

func (*List) Update

func (l *List) Update() error

func (*List) Usable

func (l *List) Usable() bool

Jump to

Keyboard shortcuts

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