mtfosbot/model/twitch_channel.go

21 lines
572 B
Go
Raw Normal View History

2018-09-07 08:33:37 +00:00
package model
import "time"
// TwitchChannel - struct
type TwitchChannel struct {
ID string `db:"id" cc:"id"`
Name string `db:"name" cc:"name"`
LastStream string `db:"laststream" cc:"laststream"`
Join bool `db:"join" cc:"join"`
OpayID string `db:"opayid" cc:"opayid"`
Ctime time.Time `db:"ctime" cc:"ctime"`
Mtime time.Time `db:"mtime" cc:"ctime"`
}
2018-09-11 16:29:38 +00:00
// GetAllChannel -
func GetAllChannel() (channels []*TwitchChannel, err error) {
err = x.Select(&channels, `select * from "public"."twitch_channel"`)
return
}