package com.bizzan.bitrade.constant;

import com.bizzan.bitrade.core.BaseEnum;
import com.fasterxml.jackson.annotation.JsonValue;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * @author 
 * @description
 * @date 2019/1/9 9:42
 */
@AllArgsConstructor
@Getter
public enum SysHelpClassification implements BaseEnum {

    HELP("新手入门"),

    FAQ("常见问题"),

    EXCHANGE("交易指南"),
    
    COININFO("币种资料"),
    
    ANALYSIS("行情技术"),
    
    PROTOCOL("条款协议"),
    
    OTHER("其他"),
    
    QR_CODE("APP二维码"),
    
    FOLLOW_PROTOCOL("交易员条款"),
    
    PRIVACY("隐私条款"),
    
    DISCLAIMER("免责声明");

    @Setter
    private String cnName;
    @Override
    @JsonValue
    public int getOrdinal() {
        return ordinal();
    }
    
    public static SysHelpClassification valueOfOrdinal(int ordinal){
        switch (ordinal){
        case 0:return HELP;
        case 1:return FAQ;
        case 2:return EXCHANGE;
        case 3:return COININFO;
        case 4:return ANALYSIS;
        case 5:return PROTOCOL;
        case 6:return OTHER;
        case 7:return QR_CODE;
        case 8:return FOLLOW_PROTOCOL;
        case 9:return PRIVACY;
        case 10:return DISCLAIMER;
        default:return null;
        }
    }
}
