package cn.com.countrygarden.bi.main.constant.wcx.enumeration;

/**
 * Created by ADMS on 2018/7/9.
 */
public enum WcxPrizeTypeEnum {
    // type; 1,2,3,4 // 字段type分别表示获奖创意,获奖人员,获奖项目,获奖区域
  /*  1 PRIZE_TYPE_BEST_GET_POINT_20
      2 PRIZE_TYPE_BEST_GET_POINT_BASELINE_TOP3

      3 PRIZE_TYPE_BEST_PASS_REGION
      4 PRIZE_TYPE_BEST_PASS_PROJECT

      5 PRIZE_TYPE_BEST_PUT_POINT
      6 PRIZE_TYPE_BEST_LEADER_PROJECT
      7 PRIZE_TYPE_BEST_NUMBER_INNOVATION*/
    InnoTop20("innoTop20", "1"),
    InnoBaselineTop3("innoBaselineTop3", "2"),
    RegionBest("regionBest", "3"),
    ProjectBest("projectBest", "4"),
    UserBestPutPoint("userBestPutPoint", "5"),
    UserLeaderBestJoin("userLeaderBestJoin", "6"),
    UserBestNumInn("userBestNumInn", "7");

    String prizeTypeName;
    String prizeType;

    WcxPrizeTypeEnum(String prizeTypeName, String prizeType) {
        this.prizeTypeName = prizeTypeName;
        this.prizeType = prizeType;
    }


    public String getPrizeType() {
        return prizeType;
    }

    public void setPrizeType(String prizeType) {
        this.prizeType = prizeType;
    }

    /**
     * 获取奖单处理方式
     */
    public static String getEntityByPrizeType(String prizeType) {
        for (WcxPrizeTypeEnum c : WcxPrizeTypeEnum.values()) {
            if (c.prizeType.equals(prizeType)) {
                return c.prizeTypeName;
            }
        }
        return null;
    }
}
