feat: scaffold work queue API
This commit is contained in:
38
internal/model/models.go
Normal file
38
internal/model/models.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Project struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
ExternalRef *string `json:"external_ref,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type DispatchLog struct {
|
||||
ID string `json:"id"`
|
||||
WorkItemID string `json:"work_item_id"`
|
||||
DispatchedAt time.Time `json:"dispatched_at"`
|
||||
Agent string `json:"agent"`
|
||||
CompletedAt *time.Time `json:"completed_at,omitempty"`
|
||||
Outcome *string `json:"outcome,omitempty"`
|
||||
}
|
||||
|
||||
type WorkItem struct {
|
||||
ID string `json:"id"`
|
||||
ProjectID *string `json:"project_id,omitempty"`
|
||||
Type string `json:"type"`
|
||||
Description string `json:"description"`
|
||||
Payload any `json:"payload,omitempty"`
|
||||
Priority int `json:"priority"`
|
||||
Status string `json:"status"`
|
||||
AssignedAgent *string `json:"assigned_agent,omitempty"`
|
||||
CreatedBy *string `json:"created_by,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
CompletedAt *time.Time `json:"completed_at,omitempty"`
|
||||
Outcome *string `json:"outcome,omitempty"`
|
||||
Notes *string `json:"notes,omitempty"`
|
||||
DispatchLog []DispatchLog `json:"dispatch_log,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user