package models import ( ruisUtil "github.com/mgr9525/go-ruisutil" "gopkg.in/mgo.v2/bson" "time" ) type MgoParam struct { Id bson.ObjectId `bson:"_id"` Key string Title string Value *map[string]interface{} Times time.Time } func (c *MgoParam) Map() *ruisUtil.Map { return ruisUtil.NewMapo(c.Value) }