package com.jwipc.supplier.constant;

import lombok.Getter;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
public enum SupplierUniqueField {
    /**
     * 单例对象
     */
    supplierName("supplierName", "供应商名称"),
    shortName("shortName", "简称"),
    businessRegisterNo("businessRegisterNo", "营业执照注册号"),
    taxNo("taxNo", "税号");
    @Getter
    private final String field;
    private final String desc;

    /**
     * 默认构造函数
     */
    SupplierUniqueField(String field, String desc) {
        this.field = field;
        this.desc = desc;
    }

    public static SupplierUniqueField forValue(String field) {
        for (SupplierUniqueField value : values()) {
            if (value.getField().equals(field)) {
                return value;
            }
        }
        return null;
    }
}
