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

/**
 * @author Walker
 * Created on 2020/4/16
 */
public enum DoctorIdentityEnum {
    UNKNOWN("", 0),
    DOCTOR("医生", 1),
    PHARMACIST("药师", 2);

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static DoctorIdentityEnum valueOf(int value) {
        for (DoctorIdentityEnum e : DoctorIdentityEnum.values()) {
            if (e.getValue() == value) {
                return e;
            }
        }
        return UNKNOWN;
    }

}
