Files
customer-server/consts/account/platform.go

28 lines
552 B
Go

package account
import "github.com/gogf/gf/v2/util/gconv"
var (
PlatformXHS = newPlatform(gconv.PtrString("xiaohongshu"), "小红书")
PlatformDY = newPlatform(gconv.PtrString("douyin"), "抖音")
PlatformKS = newPlatform(gconv.PtrString("kuaishou"), "快手")
)
type Platform *string
type platform struct {
code Platform
desc string
}
func (s platform) Code() Platform {
return s.code
}
func (s platform) Desc() string {
return s.desc
}
func newPlatform(code Platform, desc string) platform {
return platform{code: code, desc: desc}
}