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

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

public enum MedicalRecordMailingOrdersStatusEnum {

    /**
     * 订单状态，1-待审核、2-审核中、3-审核通过（待支付）、4-审核不通过、5-已取消、6-待自取、7-待邮寄、8-邮寄中、9-已完成、10-已退款
     */
    ToAudit("待审核", 1),
    Auditing("审核中", 2),
    Passed("审核通过", 3),
    NoPassed("审核不通过", 4),
    Canceled("已取消", 5),
    ToInvite("待自取", 6),
    ToBeMailed("待邮寄", 7),
    InTheMail("邮寄中", 8),
    Finished("已完成", 9),
    Refunded("已退款", 10);

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

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

}
