package com.smppw.common.pojo.enums;

import lombok.Getter;

@Getter
public enum FutureStyleRespEnum {
    //ts22_cs5_cs22_skew22_skew66_ts5_wh22_cv22_tr22_basis22_vol5_vol22
    TS22(1,"ts22","时序动量因子"),
    CS5(2,"cs5","短周期截面动量因子"),
    CS22(3,"cs22","截面动量因子"),
    SKEW22(4,"skew22","偏度因子"),
    SKEW66(5,"skew66","长周期偏度因子"),
    TS5(6,"ts5","短周期时序动量因子"),
    WH22(7,"wh22","仓单因子"),
    CV22(8,"cv22","基差因子"),
    TR22(9,"tr22","展期收益率因子"),
    BASIS22(10,"basis22","基差动量因子"),
    VOL5(11,"vol5","短周期波动因子"),
    VOL22(12,"vol22","波动因子"),
    ;

    private Integer num;
    private String name;
    private String cName;

    FutureStyleRespEnum(Integer num, String name, String cName) {
        this.num = num;
        this.name = name;
        this.cName = cName;
    }

    public static String getFutureCname(int num){
        for (FutureStyleRespEnum futureNum : FutureStyleRespEnum.values()){
            if (futureNum.getNum() == num) {
                return futureNum.getCName();
            }
        }
        return "";
    }

    public static String getFutureName(int num){
        for (FutureStyleRespEnum futureNum : FutureStyleRespEnum.values()){
            if (futureNum.getNum() == num) {
                return futureNum.getName();
            }
        }
        return "";
    }

}
