feat: support ins pause and enable
This commit is contained in:
@@ -9,6 +9,7 @@ type SendTasksIns struct {
|
||||
ContentType string `json:"content_type" gorm:"type:varchar(100) comment '实例类型';default:'';index:content_type"`
|
||||
Config string `json:"config" gorm:"type:text comment '实例配置';"`
|
||||
Extra string `json:"extra" gorm:"type:text comment '额外信息';"`
|
||||
Enable int `json:"enable" gorm:"type:int comment '开启、暂停状态';default:1;"`
|
||||
}
|
||||
|
||||
// InsEmailConfig 实例里面的邮箱config
|
||||
@@ -61,3 +62,11 @@ func DeleteMsgTaskIns(id string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// UpdateMsgTaskIns 更新实例
|
||||
func UpdateMsgTaskIns(id string, data map[string]interface{}) error {
|
||||
if err := db.Model(&SendTasksIns{}).Where("id = ?", id).Updates(data).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user