39 lines
846 B
Go
39 lines
846 B
Go
package vo
|
|
|
|
type MultiNotifyLogStatus int32
|
|
|
|
const (
|
|
MultiNotifyLogStatusWait MultiNotifyLogStatus = iota + 1
|
|
MultiNotifyLogStatusSuccess
|
|
MultiNotifyLogStatusFail
|
|
)
|
|
|
|
var MultiNotifyLogStatusMap = map[MultiNotifyLogStatus]string{
|
|
MultiNotifyLogStatusWait: "待请求",
|
|
MultiNotifyLogStatusSuccess: "请求成功",
|
|
MultiNotifyLogStatusFail: "请求失败",
|
|
}
|
|
|
|
func (s MultiNotifyLogStatus) GetText() string {
|
|
if t, ok := MultiNotifyLogStatusMap[s]; ok {
|
|
return t
|
|
}
|
|
return "未知请求状态"
|
|
}
|
|
|
|
func (s MultiNotifyLogStatus) GetValue() int32 {
|
|
return int32(s)
|
|
}
|
|
|
|
func (s MultiNotifyLogStatus) IsWait() bool {
|
|
return s == MultiNotifyLogStatusWait
|
|
}
|
|
|
|
func (s MultiNotifyLogStatus) IsSuccess() bool {
|
|
return s == MultiNotifyLogStatusSuccess
|
|
}
|
|
|
|
func (s MultiNotifyLogStatus) IsFail() bool {
|
|
return s == MultiNotifyLogStatusFail
|
|
}
|