2015-03-05 04:07:02 +07:00
|
|
|
package db
|
|
|
|
|
2015-03-06 17:00:04 +07:00
|
|
|
type Team struct {
|
2015-03-06 18:18:15 +07:00
|
|
|
ID uint64 `json:"id"`
|
2015-03-06 17:00:04 +07:00
|
|
|
Owner string `json:"owner"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
|
|
|
const orgTeamsQuery = `select * from teams where owner = ?`
|
|
|
|
|
|
|
|
func OrgTeams(login string) (teams []*Team) {
|
2015-03-06 18:29:52 +07:00
|
|
|
mustSelect(&teams, orgTeamsQuery, login)
|
2015-03-06 17:00:04 +07:00
|
|
|
return
|
|
|
|
}
|