Skip to content

Commit

Permalink
Merge pull request #2822 from actiontech/fix_rename_coding_enable
Browse files Browse the repository at this point in the history
fix: rename and add status const for sqlmanagerecordprocess
  • Loading branch information
LordofAvernus authored Dec 12, 2024
2 parents 6c9e552 + 4c498a6 commit ebedbe1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sqle/api/controller/v1/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ type GetCodingConfigurationResV1 struct {
type CodingConfigurationV1 struct {
CodingUrl string `json:"coding_url"`

IsCodingNotificationEnabled bool `json:"is_coding_notification_enabled"`
IsCodingEnabled bool `json:"is_coding_enabled"`
}

// GetWechatAuditConfigurationV1
Expand Down
2 changes: 1 addition & 1 deletion sqle/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -12272,7 +12272,7 @@ var doc = `{
"coding_url": {
"type": "string"
},
"is_coding_notification_enabled": {
"is_coding_enabled": {
"type": "boolean"
}
}
Expand Down
2 changes: 1 addition & 1 deletion sqle/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -12256,7 +12256,7 @@
"coding_url": {
"type": "string"
},
"is_coding_notification_enabled": {
"is_coding_enabled": {
"type": "boolean"
}
}
Expand Down
2 changes: 1 addition & 1 deletion sqle/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ definitions:
properties:
coding_url:
type: string
is_coding_notification_enabled:
is_coding_enabled:
type: boolean
type: object
v1.CodingResp:
Expand Down
16 changes: 13 additions & 3 deletions sqle/model/instance_audit_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,21 @@ type SQLManageRecordProcess struct {

SQLManageRecordID *uint `json:"sql_manage_record_id" gorm:"unique;not null"`
// 任务属性字段
Assignees string `json:"assignees" gorm:"type:varchar(2000)"`
Status string `json:"status" gorm:"default:\"unhandled\""`
Remark string `json:"remark" gorm:"type:varchar(4000)"`
Assignees string `json:"assignees" gorm:"type:varchar(2000)"`
Status ProcessStatus `json:"status" gorm:"default:\"unhandled\""`
Remark string `json:"remark" gorm:"type:varchar(4000)"`
}

type ProcessStatus string

const (
ProcessStatusUnhandled = "unhandled"
ProcessStatusSolved = "solved"
ProcessStatusIgnored = "ignored"
ProcessStatusManualAudited = "manual_audited"
ProcessStatusSent = "sent"
)

func (s *Storage) GetSQLManageRecordProcess(sqlManageRecordID uint) (*SQLManageRecordProcess, error) {
sqlManageRecordProcess := &SQLManageRecordProcess{}
err := s.db.Model(SQLManageRecordProcess{}).
Expand Down

0 comments on commit ebedbe1

Please sign in to comment.