feat: pricing page support multi groups #487

This commit is contained in:
1808837298@qq.com
2024-09-22 17:44:57 +08:00
parent c6ff785a83
commit ed972eef06
5 changed files with 87 additions and 40 deletions

View File

@@ -36,6 +36,12 @@ func GetEnabledModels() []string {
return models
}
func GetAllEnableAbilities() []Ability {
var abilities []Ability
DB.Find(&abilities, "enabled = ?", true)
return abilities
}
func getPriority(group string, model string, retry int) (int, error) {
groupCol := "`group`"
trueVal := "1"