package com.freemud.application.sdk.api.ordercenter.enums;

/**
 * All rights Reserved, Designed By www.freemud.cn
 *
 * @version V1.0
 * @Title: OrderClientType
 * @Package com.freemud.application.sdk.api.ordercenter.request
 * @Description:
 * @author: ping.wu
 * @date: 2019/4/2 13:44
 * @Copyright: 2019 www.freemud.cn Inc. All rights reserved.
 * 注意：本内容仅限于上海非码科技内部传阅，禁止外泄以及用于其他的商业目
 */
public enum OrderClientType {

    WE_CHAT(1, "自营微信小程序"),
    SAAS(2, "i点餐"),
    ALIPAY(3, "自营支付宝小程序"),
    HTML5(4, "自营H5"),
    ANDROID( 5, "自营安卓APP"),
    IOS(6, "自营苹果APP"),
    PC_WEB(7, "自营PC-WEB"),
    ELEME(8, "饿了么"),
    EBAI(9, "饿百"),
    JD(10, "京东"),
    MEITUAN(11, "美团外卖"),
    APP(12, "自营APP"),
    I_MEMBER(13, "i应用会员"),
    I_CARGO(14 , "i应用订货"),
    POS(15 , "POS"),
    WAI_MEAL(19,"i围餐"),
    JUBAOPEN(20, "美团聚宝盆"),
    DIANPING(21, "美团点评"),
    KOUBEI(22, "口碑"),
    SAASMALL(23, "微商城"),
    DPZHCT(24, "美团点评智慧餐厅"),
    FMWD(25, "非码微店"),
    PARKING(99 , "农工商停车"),
    FU_YOU(100 , "富有"),
    ;


    private Integer index;
    private String name;

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    OrderClientType(Integer index, String name) {
        this.index = index;
        this.name = name;
    }

    public static OrderClientType getOrderClientType(Integer index){
        for (OrderClientType orderType : values()){
            if (index.equals(orderType.getIndex())){
                return orderType;
            }
        }
        return null;
    }

}
