package vo

import (
	"fmt"
)

type OrderType uint8

const (
	OrderTypeCmb OrderType = iota + 1
)

var OrderTypeMap = map[OrderType]string{
	OrderTypeCmb: "招行",
}

func (s OrderType) GetText() string {
	if t, ok := OrderTypeMap[s]; ok {
		return t
	}
	return "未知类型"
}

func (s OrderType) String() string {
	return fmt.Sprintf("%d", s)
}

func (s OrderType) GetValue() uint8 {
	return uint8(s)
}

func (s OrderType) IsCmb() bool {
	return s == OrderTypeCmb
}
