优化索引

This commit is contained in:
2025-09-24 16:48:41 +08:00
parent 47b8c5bc65
commit 2070653f2f
3 changed files with 30 additions and 13 deletions

View File

@@ -53,8 +53,8 @@ type Plan struct {
Name string `gorm:"not null" json:"name"`
Description string `json:"description"`
ExecutionType PlanExecutionType `gorm:"not null" json:"execution_type"`
Status PlanStatus `gorm:"default:0" json:"status"` // 计划是否被启动
ExecutionType PlanExecutionType `gorm:"not null;index" json:"execution_type"`
Status PlanStatus `gorm:"default:0;index" json:"status"` // 计划是否被启动
ExecuteNum uint `gorm:"default:0" json:"execute_num"` // 计划预期执行次数
ExecuteCount uint `gorm:"default:0" json:"execute_count"` // 执行计数器