package com.ywt.outpatient.taihe.rpc.domain.enums;


/**
 * 预约挂号类型
 *
 * @author johnson lin
 * @date 2019/4/29 9:51 PM
 */
public enum RegisteredType {
    /**
     * 普通预约
     */
    GENERAL("普通预约", 1),
    /**
     * 加号预约
     */
    ADDITIONAL("加号预约", 2);

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

    private final String displayName;

    private final int value;

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static boolean isDefined(int value) {
        for (RegisteredType type : RegisteredType.values()) {
            if (type.value == value) {
                return true;
            }
        }
        return false;
    }
}
