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

import com.ywt.biz.common.util.Checker;

public enum CommonDoctorSettingTypeEnum {


    Amount("咨询费用", 1),
    Treat("是否咨询", 2),
    TreatNoAccept("是否开启问诊但不接诊", 3),
    FreeTreat("是否3天内有1次免费", 4),
    PresStatus("处方状态", 5),
    Pharmacy("访问药房", 6),
    AllowSet("是否允许医生设置问诊开启和费用", 7);


    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static CommonDoctorSettingTypeEnum valueOf(int value) {
        for (CommonDoctorSettingTypeEnum enumObj : CommonDoctorSettingTypeEnum.values()) {
            if (enumObj.getValue() == value) {
                return enumObj;
            }
        }
        return null;
    }
    public static String getDisplayName(int value) {
        CommonDoctorSettingTypeEnum enumObj = valueOf(value);
        if (!Checker.isNone(enumObj)){
            return enumObj.displayName;
        }
        return "";
    }

}
