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

import com.ywt.mg.core.utils.Checker;



public enum MedicalRecordMailingOrdersTypeEnum {

    /**
     * 方式，1-邮寄，2-自取
     */
    ForMyself("为本人申请", 1),
    ForOther("为他人申请", 2),
    ForBaby("为新生儿申请", 3);


    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

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