19 lines
521 B
Go
19 lines
521 B
Go
package models
|
|
|
|
import "go.infratographer.com/x/gidx"
|
|
|
|
type OrganizationDetails struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Memberships []*Membership[OrganizationDetails] `json:"memberships"`
|
|
Projects []*ProjectDetails `json:"projects"`
|
|
}
|
|
|
|
func (d *OrganizationDetails) PrefixedID() gidx.PrefixedID {
|
|
if d.ID == "" {
|
|
return gidx.NullPrefixedID
|
|
}
|
|
|
|
return gidx.PrefixedID(IDPrefixOrganization + "-" + d.ID)
|
|
}
|