示例#1
0
文件: models.go 项目: thedodd/api
// Collection - get the collection for this data model.
func (model *User) Collection() *mgo.Collection {
	db := common.GetDatabase()
	return db.C("users")
}
示例#2
0
文件: models.go 项目: thedodd/api
// Collection - get the collection for this data model.
func (model *BuildModel) Collection() *mgo.Collection {
	db := common.GetDatabase()
	return db.C("elasticsearchBuilds")
}