oc-lib/models/resources/workflow.go

19 lines
766 B
Go
Raw Normal View History

2024-11-28 16:49:41 +01:00
package resources
2024-07-18 11:51:12 +02:00
import (
2024-11-28 11:05:54 +01:00
"cloud.o-forge.io/core/oc-lib/models/resources/resource_model"
2024-07-18 13:35:14 +02:00
"cloud.o-forge.io/core/oc-lib/models/utils"
"cloud.o-forge.io/core/oc-lib/tools"
2024-07-18 11:51:12 +02:00
)
// WorkflowResource is a struct that represents a workflow resource
// it defines the resource workflow
2024-07-19 10:54:58 +02:00
type WorkflowResource struct {
2024-07-30 12:08:13 +02:00
resource_model.AbstractResource
WorkflowID string `bson:"workflow_id,omitempty" json:"workflow_id,omitempty"` // WorkflowID is the ID of the native workflow
2024-07-18 11:51:12 +02:00
}
2024-11-28 11:05:54 +01:00
func (d *WorkflowResource) GetAccessor(peerID string, groups []string, caller *tools.HTTPCaller) utils.Accessor {
2024-11-28 16:49:41 +01:00
return New[*WorkflowResource](tools.WORKFLOW_RESOURCE, peerID, groups, caller, func() utils.DBObject { return &WorkflowResource{} }) // Create a new instance of the accessor
2024-07-18 11:51:12 +02:00
}