initial commit
This commit is contained in:
18
internal/metal/models/organizations.go
Normal file
18
internal/metal/models/organizations.go
Normal file
@@ -0,0 +1,18 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user