add exec
This commit is contained in:
@@ -16,7 +16,8 @@ import (
|
||||
*/
|
||||
type StorageResource struct {
|
||||
AbstractResource[*StorageResourceInstance] // AbstractResource contains the basic fields of an object (id, name)
|
||||
Type common.StorageType `bson:"type,omitempty" json:"type,omitempty"` // Type is the type of the storage
|
||||
Type common.StorageType `bson:"type,omitempty"` // Type is the type of the storage
|
||||
TypeJSON string `json:"type,omitempty"`
|
||||
Acronym string `bson:"acronym,omitempty" json:"acronym,omitempty"` // Acronym is the acronym of the storage
|
||||
}
|
||||
|
||||
@@ -24,6 +25,11 @@ func (d *StorageResource) GetAccessor(request *tools.APIRequest) utils.Accessor
|
||||
return NewAccessor[*StorageResource](tools.STORAGE_RESOURCE, request, func() utils.DBObject { return &StorageResource{} }) // Create a new instance of the accessor
|
||||
}
|
||||
|
||||
func (r *StorageResource) Transform() utils.DBObject {
|
||||
r.TypeJSON = r.Type.String()
|
||||
return r
|
||||
}
|
||||
|
||||
type StorageResourceInstance struct {
|
||||
ResourceInstance[*StorageResourcePartnership]
|
||||
Local bool `bson:"local" json:"local"`
|
||||
|
||||
Reference in New Issue
Block a user