fix: fix priority not updated & random choice not working

This commit is contained in:
JustSong committed 2023-09-18 21:43:45 +08:00
1 parent ead3b915ca
commit ebdab831e6
3 files changed
+19 -6

No files matched your search

+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) {