mtfosbot/model/version_ctrl.go

18 lines
432 B
Go
Raw Normal View History

2018-09-09 15:36:56 +00:00
package model
import "time"
// VersionCTRL -
type VersionCTRL struct {
Version int `db:"version" cc:"version"`
Ctime time.Time `db:"ctime" cc:"ctime"`
QueryStr string `db:"querystr" cc:"querystr"`
}
// SaveVersionLog -
func SaveVersionLog(version int, qstr string) error {
query := `insert into "public"."version_ctrl" ("version", "querystr") values (?, ?)`
_, err := x.Exec(query, version, qstr)
return err
}