|
|
@@ -1,6 +1,9 @@ |
|
|
package schsdk |
|
|
package schsdk |
|
|
|
|
|
|
|
|
import "time" |
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
|
cdssdk "gitlink.org.cn/cloudream/common/sdks/storage" |
|
|
|
|
|
"time" |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
type FlowData struct { |
|
|
type FlowData struct { |
|
|
Nodes []Node `json:"nodes"` |
|
|
Nodes []Node `json:"nodes"` |
|
|
@@ -42,25 +45,25 @@ type Text struct { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type JobFlowDAO struct { |
|
|
type JobFlowDAO struct { |
|
|
ID int64 `gorm:"column:id;primaryKey;autoIncrement" json:"ID"` |
|
|
|
|
|
UserID int64 `gorm:"column:user_id;not null" json:"UserID"` |
|
|
|
|
|
Name string `gorm:"column:name;size:255;not null" json:"Name"` |
|
|
|
|
|
Description string `gorm:"column:description;size:255" json:"Description"` |
|
|
|
|
|
Content string `gorm:"column:content;type:text" json:"Content"` |
|
|
|
|
|
Status string `gorm:"column:status;type:enum('pending','running','fail','success');default:'pending'" json:"Status"` |
|
|
|
|
|
JobType string `gorm:"column:job_type;size:255" json:"JobType"` |
|
|
|
|
|
UpdatedAt time.Time `gorm:"column:update_at;autoUpdateTime" json:"UpdatedAt"` |
|
|
|
|
|
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime" json:"CreatedAt"` |
|
|
|
|
|
|
|
|
ID int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"` |
|
|
|
|
|
UserID cdssdk.UserID `gorm:"column:user_id;not null" json:"userID"` |
|
|
|
|
|
Name string `gorm:"column:name;size:255;not null" json:"name"` |
|
|
|
|
|
Description string `gorm:"column:description;size:255" json:"description"` |
|
|
|
|
|
Content string `gorm:"column:content;type:text" json:"content"` |
|
|
|
|
|
Status string `gorm:"column:status;type:enum('pending','running','failed','success');default:'pending'" json:"status"` |
|
|
|
|
|
JobType string `gorm:"column:job_type;size:255" json:"jobType"` |
|
|
|
|
|
UpdatedAt time.Time `gorm:"column:update_at;autoUpdateTime" json:"updatedAt"` |
|
|
|
|
|
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime" json:"createdAt"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type JobFlow struct { |
|
|
type JobFlow struct { |
|
|
ID int64 `json:"ID"` |
|
|
|
|
|
UserID int64 `json:"UserID"` |
|
|
|
|
|
Name string `json:"Name"` |
|
|
|
|
|
Description string `json:"Description"` |
|
|
|
|
|
Content FlowData `json:"Content"` |
|
|
|
|
|
Status string `json:"Status"` |
|
|
|
|
|
JobType string `json:"JobType"` |
|
|
|
|
|
UpdatedAt time.Time `json:"UpdatedAt"` |
|
|
|
|
|
CreatedAt time.Time `json:"CreatedAt"` |
|
|
|
|
|
|
|
|
ID int64 `json:"id"` |
|
|
|
|
|
UserID cdssdk.UserID `json:"userID"` |
|
|
|
|
|
Name string `json:"name"` |
|
|
|
|
|
Description string `json:"description"` |
|
|
|
|
|
Content FlowData `json:"content"` |
|
|
|
|
|
Status string `json:"status"` |
|
|
|
|
|
JobType string `json:"jobType"` |
|
|
|
|
|
UpdatedAt time.Time `json:"updatedAt"` |
|
|
|
|
|
CreatedAt time.Time `json:"createdAt"` |
|
|
} |
|
|
} |