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

/**
 * 状态，位运算，16-未读，1-已读，2-是否在用户端展示,4-全体推送，8-单独推送
 */
public enum ArticlesUnionStatusEnum {
    NoRead("未读", 16),
    Read("已读", 1),
    IsShow("是否在用户端展示", 2),
    AllPush("全体推送", 4),
    SinglePush("单独推送", 8),
    UNKNOWN("",0);
    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static ArticlesUnionStatusEnum valueOf (int value){
        switch (value){
            case 1:
                return Read;
            case 2:
                return IsShow;
            case 4:
                return AllPush;
            case 8:
                return SinglePush;
            case 16:
                return NoRead;
            default :
                return UNKNOWN;
        }
    }

}