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

/**
 * @author Walker
 * Created on 2020/10/10 1.
 */
public enum OutpatientOrderPayInsTypeEnum {

    UNKNOWN("未知类型", 0),
    SELF("自费", 1),
    MED_INSURANCE("医保", 2)
    ;

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

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