refactor: remove ExternalType from CustomerIdentity and related structures

This commit is contained in:
mlogclub
2026-04-27 18:40:25 +08:00
parent f8b44ab127
commit 73b78a817d
8 changed files with 23 additions and 58 deletions
-20
View File
@@ -6,26 +6,6 @@ func GetCustomerSourceTypeLabel(sourceType ExternalSource) string {
return GetExternalSourceLabel(ExternalSource(sourceType))
}
// ExternalType 客户外部身份类型。
type ExternalType string
const (
ExternalTypeGuest ExternalType = "guest"
ExternalTypeUser ExternalType = "user"
)
var externalTypeLabelMap = map[ExternalType]string{
ExternalTypeGuest: "访客",
ExternalTypeUser: "用户",
}
func GetExternalTypeLabel(externalType ExternalType) string {
if s, ok := externalTypeLabelMap[externalType]; ok {
return s
}
return string(externalType)
}
// 联系方式类型
type ContactType string
+2 -2
View File
@@ -6,13 +6,13 @@ package enums
type ExternalSource string
const (
ExternalSourceWebChat ExternalSource = "web_chat"
ExternalSourceWebChat ExternalSource = "guest"
ExternalSourceWechatMP ExternalSource = "wechat_mp"
ExternalSourceWxWorkKF ExternalSource = "wxwork_kf"
)
var externalSourceLabelMap = map[ExternalSource]string{
ExternalSourceWebChat: "网页客服",
ExternalSourceWebChat: "访客",
ExternalSourceWechatMP: "微信公众号",
ExternalSourceWxWorkKF: "企业微信客服",
}