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

/**
 * @author Walker
 * Created on 2021/6/30
 */
public enum DeletedEnum {

    NORMAL("未删除", 0),
    DELETED("删除", 1),
    ;

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

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