refactor: clean code

This commit is contained in:
Fu Diwei
2025-01-18 22:18:47 +08:00
parent 3e1ecd60a1
commit ce4c590b1c
20 changed files with 108 additions and 93 deletions

View File

@@ -2,14 +2,7 @@ package domain
import "time"
type WorkflowRunStatusType string
const (
WorkflowRunStatusTypePending WorkflowRunStatusType = "pending"
WorkflowRunStatusTypeRunning WorkflowRunStatusType = "running"
WorkflowRunStatusTypeSucceeded WorkflowRunStatusType = "succeeded"
WorkflowRunStatusTypeFailed WorkflowRunStatusType = "failed"
)
const CollectionNameWorkflowRun = "workflow_run"
type WorkflowRun struct {
Meta
@@ -22,6 +15,15 @@ type WorkflowRun struct {
Error string `json:"error" db:"error"`
}
type WorkflowRunStatusType string
const (
WorkflowRunStatusTypePending WorkflowRunStatusType = "pending"
WorkflowRunStatusTypeRunning WorkflowRunStatusType = "running"
WorkflowRunStatusTypeSucceeded WorkflowRunStatusType = "succeeded"
WorkflowRunStatusTypeFailed WorkflowRunStatusType = "failed"
)
type WorkflowRunLog struct {
NodeId string `json:"nodeId"`
NodeName string `json:"nodeName"`