30 lines
953 B
Go
30 lines
953 B
Go
package v1
|
|
|
|
import "time"
|
|
|
|
// Workflow represents a task workflow
|
|
type Workflow struct {
|
|
ID string `json:"id"`
|
|
WorkspaceID string `json:"workspace_id"`
|
|
Name string `json:"name"`
|
|
Description *string `json:"description,omitempty"`
|
|
Prompt *string `json:"prompt,omitempty"`
|
|
SortOrder int `json:"sort_order"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
// CreateWorkflowRequest for creating a new workflow
|
|
type CreateWorkflowRequest struct {
|
|
Name string `json:"name" binding:"required,max=255"`
|
|
Description *string `json:"description,omitempty"`
|
|
Prompt *string `json:"prompt,omitempty"`
|
|
}
|
|
|
|
// UpdateWorkflowRequest for updating a workflow
|
|
type UpdateWorkflowRequest struct {
|
|
Name *string `json:"name,omitempty" binding:"omitempty,max=255"`
|
|
Description *string `json:"description,omitempty"`
|
|
Prompt *string `json:"prompt,omitempty"`
|
|
}
|