voucher/internal/biz/kog/kog.go

39 lines
741 B
Go

package kog
type NoticeType uint8
const (
NoticeTypeCmbToBB NoticeType = iota + 1
NoticeTypeBBToWechat
NoticeTypeWechatToBB
)
var SynNoticeTypeMap = map[NoticeType]string{
NoticeTypeCmbToBB: "招行请求蓝色兄弟",
NoticeTypeBBToWechat: "蓝色兄弟请求微信",
NoticeTypeWechatToBB: "微信请求蓝色兄弟",
}
func (s NoticeType) GetText() string {
if t, ok := SynNoticeTypeMap[s]; ok {
return t
}
return "未知类型"
}
func (s NoticeType) GetValue() uint8 {
return uint8(s)
}
func (s NoticeType) IsCmbToBB() bool {
return s == NoticeTypeCmbToBB
}
func (s NoticeType) IsBBToWechat() bool {
return s == NoticeTypeBBToWechat
}
func (s NoticeType) IsWechatToBB() bool {
return s == NoticeTypeWechatToBB
}