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

/**
 * 资讯类型(对应Articles表里面的type字段)
 */
public enum ArticlesTypeEnum {
    UNKNOWN("",0),
    Article("图文", 1),
    Video("视频", 2),
    PDFFile("PDF", 3);

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static ArticlesTypeEnum valueOf (int value){
        switch (value){
            case 1:
                return Article;
            case 2:
                return Video;
            case 3:
                return PDFFile;
            default:
                return UNKNOWN;
        }
    }


}
