package com.ywt.mg.domain.models.enums;

/**
 * 经销商级别枚举
 */
public enum DrugProviderDepthEnum {
    UNKNOWN("", 0),
    First("一级", 1),
    Second("二级", 2),
    Third("三级", 3),
    Fourth("四级",4),
    Fifth("五级",5),
    Sixth("六级",6),
    Seventh("七级",7),
    Eighth("八级",8),
    Ninth("九级",9),
    Tenth("十级",10);

    private final String displayName;

    private final int value;

    DrugProviderDepthEnum(String displayName, int value) {
        this.displayName = displayName;
        this.value = value;
    }

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static DrugProviderDepthEnum valueOf(int value) {

        switch (value) {
            case 1:
                return First;
            case 2:
                return Second;
            case 3:
                return Third;
            case 4:
                return Fourth;
            case 5:
                return Fifth;
            case  6:
                return Sixth;
            case 7:
                return Seventh;
            case 8:
                return Eighth;
            case 9:
                return Ninth;
            case 10:
                return Tenth;
            default:
                return UNKNOWN;
        }
    }
}
