package core

import (
	"hexasoftware/x/hqi"
	"hexasoftware/x/hqi/drv/mgodrv"
	"simple-web/core/usersvc"

	mgo "gopkg.in/mgo.v2-unstable"
)

type Session struct {
	session *mgo.Session

	// Session based stuff
}

func (s *Session) User() *usersvc.Service {
	coll := s.session.DB("mgo-test").C("users")
	q := hqi.NewQuery(&mgodrv.Driver{coll})
	return usersvc.New(q)
}
