package com.hw.nativeapp.config.enums;

public enum  LogisPayTypeEnum {

    //物流支付方 1 公司 2 客户
    TYPE_COMPANY(1, "公司"),
    TYPE_CUSTOMER(2, "客户"),
    TYPE_UNKNOW(99, "未知");

    LogisPayTypeEnum(Integer type, String name){
        this.type = type;
        this.name = name;
    }

    public static String getNameByType(Integer type){
        for (LogisPayTypeEnum item : LogisPayTypeEnum.values()){
            if (item.type.equals(type)){
                return item.getName();
            }
        }
        return LogisPayTypeEnum.TYPE_UNKNOW.getName();
    }

    private Integer type;
    private String name;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

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