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

/**
 * 处方作废状态
 * @author Walker
 * Created on 2020/6/28
 */
public enum PresCancelStatusEnum {

    FORBID("不可作废", -1),
    INIT("", 0),
    PROCESSING("作废申请中", 1),
    CANCELED("已作废", 2),
    FAILED("作废失败", 3)
    ;

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

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