- update model

master v1.0.70
李光春 2 years ago
parent 08ee16063c
commit 8e88606e91

@ -1,3 +1,5 @@
package gojobs
const Version = "1.0.69"
const Version = "1.0.70"
const SpecifyIpNull = "0.0.0.0"

@ -20,9 +20,9 @@ type Task struct {
CustomSequence int64 `gorm:"index;comment:自定义顺序" json:"custom_sequence"` // 自定义顺序
Type string `gorm:"index;comment:类型" json:"type"` // 类型
TypeName string `gorm:"comment:类型名称" json:"type_name"` // 类型名称
CreatedIp string `gorm:"type:inet;comment:创建外网IP" json:"created_ip"` // 创建外网IP
SpecifyIp string `gorm:"type:inet;index;comment:指定外网IP" json:"specify_ip"` // 指定外网IP
UpdatedIp string `gorm:"type:inet;comment:更新外网IP" json:"updated_ip"` // 更新外网IP
CreatedIp string `gorm:"type:inet;default:0.0.0.0;comment:创建外网IP" json:"created_ip"` // 创建外网IP
SpecifyIp string `gorm:"type:inet;default:0.0.0.0;index;comment:指定外网IP" json:"specify_ip"` // 指定外网IP
UpdatedIp string `gorm:"type:inet;default:0.0.0.0;comment:更新外网IP" json:"updated_ip"` // 更新外网IP
Result string `gorm:"comment:结果" json:"result"` // 结果
NextRunTime time.Time `gorm:"comment:下次运行时间" json:"next_run_time"` // 下次运行时间
CreatedAt time.Time `gorm:"autoCreateTime;comment:创建时间" json:"created_at"` // 创建时间

@ -26,7 +26,7 @@ func (j *JobsGorm) GetIssueAddress(ctx context.Context, workers []string, v *job
)
// 赋值ip
if v.SpecifyIp != "" {
if v.SpecifyIp != "" && v.SpecifyIp != SpecifyIpNull {
currentIp = v.SpecifyIp
appointIpStatus = true
}

Loading…
Cancel
Save