fix: fix priority not updated & random choice not working

This commit is contained in:
JustSong
2023-09-18 21:43:45 +08:00
parent ecf8a6d875
commit a5647b1ea7
3 changed files with 19 additions and 6 deletions

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