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

/**
 * @author Walker
 * Created on 2021/7/2
 */
public enum MedEquipOccupyStatusEnum {

    AVAILABLE("未使用", 0),
    OCCUPIED("使用中", 1)
    ;

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

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