package core

import (
	"simple-web/core/usersvc"

	hqi "dev.hexasoftware.com/hxs/hqi.git"
	mgodrv "dev.hexasoftware.com/hxs/hqi.git/drv/mgodrv"

	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)
}
