Files
leanote/app/info/Configinfo.go

26 lines
956 B
Go
Raw Permalink Normal View History

package info
import (
"gopkg.in/mgo.v2/bson"
"time"
)
2014-10-22 16:20:45 +08:00
// 配置, 每一个配置一行记录
type Config struct {
2014-10-22 16:20:45 +08:00
ConfigId bson.ObjectId `bson:"_id"`
UserId bson.ObjectId `UserId`
Key string `Key`
2015-11-13 17:58:41 +08:00
ValueStr string `ValueStr,omitempty` // "1"
ValueArr []string `ValueArr,omitempty` // ["1","b","c"]
ValueMap map[string]string `ValueMap,omitempty` // {"a":"bb", "CC":"xx"}
2014-10-22 16:20:45 +08:00
ValueArrMap []map[string]string `ValueArrMap,omitempty` // [{"a":"B"}, {}, {}]
IsArr bool `IsArr` // 是否是数组
IsMap bool `IsMap` // 是否是Map
IsArrMap bool `IsArrMap` // 是否是数组Map
// StringConfigs map[string]string `StringConfigs` // key => value
// ArrayConfigs map[string][]string `ArrayConfigs` // key => []value
UpdatedTime time.Time `UpdatedTime`
}