package constant

type CurrencyTypeStr string

const (
	PointsCurrency CurrencyTypeStr = "POINTS" // 积分
	TonCurrency    CurrencyTypeStr = "TON"
	UsdtCurrency   CurrencyTypeStr = "USDT"
)

var (
	currencyMap map[string]CurrencyTypeStr
)

func init() {
	currencyMap = make(map[string]CurrencyTypeStr, 8)
	currencyMap["POINTS"] = PointsCurrency
	currencyMap["TON"] = TonCurrency
	currencyMap["USDT"] = UsdtCurrency
}

func CurrencyValid(currency string) bool {
	_, exist := currencyMap[currency]
	return exist
}
