func (self *Game) Messages(d *kol.DB) (result Messages, err error) { if err = d.Query().Where(kol.Equals{"GameId", self.Id}).All(&result); err != nil { return } sort.Sort(result) return }
func (self *Game) Member(d *kol.DB, email string) (result *Member, err error) { var member Member var found bool if found, err = d.Query().Where(kol.And{kol.Equals{"GameId", self.Id}, kol.Equals{"UserId", kol.Id(email)}}).First(&member); found && err == nil { result = &member } return }
func (self *Game) Phases(d *kol.DB) (result Phases, err error) { err = d.Query().Where(kol.Equals{"GameId", self.Id}).All(&result) return }