ServiceKey.java 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. package com.qxgmat.data.constants.enums;
  2. public enum ServiceKey {
  3. VIP("vip", "VIP", 0, 0), // 收藏和错题处的组卷、导出;笔记导出功能;部分解析只有VIP可以看;下载模考报告; 解锁完整版模考报告;“提问开放”期间有提问权限
  4. TEXTBOOK("textbook", "千行机经", 180, 30),
  5. QX_CAT("qx_cat", "千行-CAT模考(6套)", 180, 180), // 可以考2次
  6. ;
  7. public String key;
  8. // 天数
  9. public Integer expireDay;
  10. // 天数
  11. public Integer useExpireDay;
  12. public String title;
  13. private ServiceKey(String key, String title, Integer expireDay, Integer useExpireDay){
  14. this.key = key;
  15. this.expireDay = expireDay;
  16. this.useExpireDay = useExpireDay;
  17. this.title = title;
  18. }
  19. public static ServiceKey ValueOf(String name){
  20. if (name == null || name.isEmpty()) return null;
  21. try{
  22. return ServiceKey.valueOf(name.toUpperCase());
  23. }catch (Exception e){
  24. return null;
  25. }
  26. }
  27. }