package com.jwipc.supplier.constant;

/**
 * <p>
 * 供应商关联表类型 枚举
 * </p>
 *
 * @author N.Zhang
 * @version 1.0
 * @since JDK 1.8
 */
public enum SupplierFollowTableTypeEnum {
    /**
     * 联系人
     */
    SupplierContact("supplierContact","t_supplier_contacts", "联系人"),
    /**
     * 供应商银行
     */
    Bank("bank","t_supplier_bank", "供应商银行");

    private final String type;
    private final String tableName;
    private final String desc;


    SupplierFollowTableTypeEnum(String type,String tableName, String desc) {
        this.type = type;
        this.desc = desc;
        this.tableName = tableName;
    }

    public String getType() {
        return type;
    }

    public String getTableName() {
        return tableName;
    }

    public String getDesc() {
        return desc;
    }

    public static SupplierFollowTableTypeEnum getValue(String type) {
        for (SupplierFollowTableTypeEnum typeEnum : values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum;
            }
        }
        return null;
    }

}
