feat: add ExternalType to customer identity model and update related services and enums

This commit is contained in:
mlogclub
2026-04-27 18:07:56 +08:00
parent 1bb4608051
commit feecbdf1d0
4 changed files with 31 additions and 0 deletions
+20
View File
@@ -6,6 +6,26 @@ 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