package com.sonic.frog.enums;

/**
 * 交易业务分类：根据业务分类
 * @author Xi.He
 */
public enum PayGenrtatorCodeType {
	TRADE(1, "交易号"),
    WITHDRAW(2, "提现号"),
	CHANNEL_BILL(3,"支付流水号"),
	ACCOUNT_BILL(4,"用户流水号"),
	REFUND_BILL(5,"退款流水号"),
    ;
    /** 编码 */
    private int value;
    /** 名称 */
    private String desc;

    PayGenrtatorCodeType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static PayGenrtatorCodeType get(int value) {
        for (PayGenrtatorCodeType payGenrtatorCodeType : values()) {
            if (payGenrtatorCodeType.getValue() == value) {
                return payGenrtatorCodeType;
            }
        }
        return null;
    }

    /**
     * 根据站点类型获取交易枚举类型
     * @param siteType
     * @return
     */
    public static PayGenrtatorCodeType getTradeType(String siteType) {
        return TRADE;
    }

}
