Files
im_manager/server/internal/consts/im_product_config.go
T

53 lines
1.5 KiB
Go

package consts
import (
"hotgo/internal/library/dict"
"hotgo/internal/model"
)
func init() {
dict.RegisterEnums("ImAppPlatformOptions", "IM客户端平台选项", ImAppPlatformOptions)
dict.RegisterEnums("ImAppUpdateTypeOptions", "IM客户端更新类型选项", ImAppUpdateTypeOptions)
dict.RegisterEnums("ImAbuseTargetTypeOptions", "IM举报对象类型选项", ImAbuseTargetTypeOptions)
dict.RegisterEnums("ImAbuseReasonEnabledOptions", "IM举报原因启用状态", ImAbuseReasonEnabledOptions)
}
const (
ImAppPlatformIos = "ios"
ImAppPlatformAndroid = "android"
)
const (
ImAppUpdateTypeNone = "none"
ImAppUpdateTypeRecommended = "recommended"
ImAppUpdateTypeForce = "force"
)
const (
ImAbuseTargetTypeUser = "user"
ImAbuseTargetTypeGroup = "group"
ImAbuseTargetTypeMessage = "message"
)
var ImAppPlatformOptions = []*model.Option{
dict.GenPrimaryOption(ImAppPlatformIos, "iOS"),
dict.GenSuccessOption(ImAppPlatformAndroid, "Android"),
}
var ImAppUpdateTypeOptions = []*model.Option{
dict.GenDefaultOption(ImAppUpdateTypeNone, "无需更新"),
dict.GenWarningOption(ImAppUpdateTypeRecommended, "建议更新"),
dict.GenErrorOption(ImAppUpdateTypeForce, "强制更新"),
}
var ImAbuseTargetTypeOptions = []*model.Option{
dict.GenPrimaryOption(ImAbuseTargetTypeUser, "用户"),
dict.GenSuccessOption(ImAbuseTargetTypeGroup, "群组"),
dict.GenWarningOption(ImAbuseTargetTypeMessage, "消息"),
}
var ImAbuseReasonEnabledOptions = []*model.Option{
dict.GenWarningOption(0, "禁用"),
dict.GenSuccessOption(1, "启用"),
}