feat(application): add Environment field and inject into Slurm job submission
This commit is contained in:
@@ -24,6 +24,7 @@ type Application struct {
|
||||
Category string `gorm:"size:255" json:"category,omitempty"` // 分类
|
||||
ScriptTemplate string `gorm:"type:text;not null" json:"script_template"` // 脚本模板
|
||||
Parameters json.RawMessage `gorm:"type:json" json:"parameters,omitempty"` // 参数表单JSON
|
||||
Environment json.RawMessage `gorm:"type:text" json:"environment,omitempty"` // 环境变量JSON
|
||||
Scope string `gorm:"size:50;default:'system'" json:"scope,omitempty"` // 作用域(system/user)
|
||||
CreatedBy int64 `json:"created_by,omitempty"` // 创建者ID
|
||||
CreatedAt time.Time `json:"created_at"` // 创建时间
|
||||
@@ -53,6 +54,7 @@ type CreateApplicationRequest struct {
|
||||
Category string `json:"category,omitempty"` // 分类
|
||||
ScriptTemplate string `json:"script_template" binding:"required"` // 脚本模板(必填)
|
||||
Parameters json.RawMessage `json:"parameters,omitempty"` // 参数表单JSON
|
||||
Environment map[string]string `json:"environment,omitempty"` // 环境变量
|
||||
Scope string `json:"scope,omitempty"` // 作用域
|
||||
}
|
||||
|
||||
@@ -64,6 +66,7 @@ type UpdateApplicationRequest struct {
|
||||
Category *string `json:"category,omitempty"` // 分类
|
||||
ScriptTemplate *string `json:"script_template,omitempty"` // 脚本模板
|
||||
Parameters *json.RawMessage `json:"parameters,omitempty"` // 参数表单JSON
|
||||
Environment *json.RawMessage `json:"environment,omitempty"` // 环境变量
|
||||
Scope *string `json:"scope,omitempty"` // 作用域
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user