fix: fix priority not updated & random choice not working

This commit is contained in:
JustSong
2023-09-18 21:43:45 +08:00
parent ead3b915ca
commit ebdab831e6
3 changed files with 19 additions and 6 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ type Ability struct {
Model string `json:"model" gorm:"primaryKey;autoIncrement:false"`
ChannelId int `json:"channel_id" gorm:"primaryKey;autoIncrement:false;index"`
Enabled bool `json:"enabled"`
Priority int64 `json:"priority" gorm:"bigint;default:0"`
Priority *int64 `json:"priority" gorm:"bigint;default:0"`
}
func GetRandomSatisfiedChannel(group string, model string) (*Channel, error) {