/**
 * All rights Reserved, Designed By www.freemud.cn
 *
 * @Title: OrderType
 * @Package cn.freemud.enums
 * @Description: 订单状态
 * @author: liming.guo
 * @date: 2018/5/21 14:43
 * @version V1.0
 * @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
 * 注意：本内容仅限于上海非码科技内部传阅，禁止外泄以及用于其他的商业目
 */
package com.freemud.sdk.api.assortment.order.enums;

public enum QueryPayType {

    ONLINE_PAY("ONLINE_PAY", "线上支付"),
    CASH_ON_DELIVERY("CASH_ON_DELIVERY", "货到付款");

    private String code;
    private String desc;

    QueryPayType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static QueryPayType getByCode(Integer code) {
        for (QueryPayType payType : values()) {
            if (payType.getCode().equals(code)) {
                return payType;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
