()
| 28 | } |
| 29 | |
| 30 | func GetAllEnableAbilityWithChannels() ([]AbilityWithChannel, error) { |
| 31 | var abilities []AbilityWithChannel |
| 32 | err := DB.Table("abilities"). |
| 33 | Select("abilities.*, channels.type as channel_type"). |
| 34 | Joins("left join channels on abilities.channel_id = channels.id"). |
| 35 | Where("abilities.enabled = ?", true). |
| 36 | Scan(&abilities).Error |
| 37 | return abilities, err |
| 38 | } |
| 39 | |
| 40 | func GetGroupEnabledModels(group string) []string { |
| 41 | var models []string |