This commit is contained in:
@@ -149,3 +149,37 @@ type DeployResult struct {
|
||||
Success bool `json:"success" example:"true" description:"Whether deployment succeeded"`
|
||||
Error string `json:"error,omitempty" example:"" description:"Error message if deployment failed"`
|
||||
}
|
||||
|
||||
// Script represents a stored script with path and interpreter binding.
|
||||
type Script struct {
|
||||
ID int64 `json:"id"`
|
||||
Path string `json:"path"`
|
||||
Content string `json:"content"`
|
||||
InterpreterID int64 `json:"interpreter_id"`
|
||||
CreatedAt *string `json:"created_at"`
|
||||
UpdatedAt *string `json:"updated_at"`
|
||||
}
|
||||
|
||||
// ScriptCreate is the request body for creating a script.
|
||||
type ScriptCreate struct {
|
||||
Path string `json:"path" binding:"required"`
|
||||
Content string `json:"content"`
|
||||
InterpreterID int64 `json:"interpreter_id" binding:"required"`
|
||||
}
|
||||
|
||||
// ScriptUpdate is the request body for updating a script.
|
||||
type ScriptUpdate struct {
|
||||
Path *string `json:"path"`
|
||||
Content *string `json:"content"`
|
||||
InterpreterID *int64 `json:"interpreter_id"`
|
||||
}
|
||||
|
||||
// ScriptTreeNode represents a node in the script directory tree.
|
||||
type ScriptTreeNode struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"` // "folder" or "file"
|
||||
Children []ScriptTreeNode `json:"children,omitempty"`
|
||||
ID *int64 `json:"id,omitempty"`
|
||||
Content *string `json:"content,omitempty"`
|
||||
InterpreterID *int64 `json:"interpreter_id,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user