initial commit
This commit is contained in:
18
internal/metal/models/projects.go
Normal file
18
internal/metal/models/projects.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package models
|
||||
|
||||
import "go.infratographer.com/x/gidx"
|
||||
|
||||
type ProjectDetails struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Memberships []*Membership[ProjectDetails] `json:"memberships"`
|
||||
Organization *OrganizationDetails `json:"organization"`
|
||||
}
|
||||
|
||||
func (d *ProjectDetails) PrefixedID() gidx.PrefixedID {
|
||||
if d.ID == "" {
|
||||
return gidx.NullPrefixedID
|
||||
}
|
||||
|
||||
return gidx.PrefixedID(IDPrefixProject + "-" + d.ID)
|
||||
}
|
||||
Reference in New Issue
Block a user