1
0

Started working on namespaces

This commit is contained in:
kolaente
2018-06-14 17:43:00 +02:00
parent ac0a50663d
commit bd2bf24813
2 changed files with 48 additions and 1 deletions

View File

@ -63,3 +63,13 @@ type TeamList struct {
func (TeamList) TableName() string {
return "team_list"
}
func GetAllTeamsByNamespaceID(id int64) (teams []*Team, err error) {
err = x.Table("teams").
Join("INNER", "team_namespaces", "teams.id = team_id").
Where("teams.namespace_id = ?", id).
Find(teams)
return
}