TrademarkApplyStatus.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package com.miniframe.generate.appcode;
  2. /**
  3. * 商标公证状态
  4. */
  5. public enum TrademarkApplyStatus {
  6. apply("apply", "0", "申请提交"),
  7. applyEnd("applyEnd", "1", "提交完成"),
  8. aliveCheckSuc("aliveCheckSuc", "2", "活体检测"),
  9. aliveCheckFail("aliveCheckFail", "3", "活体检测失败"),
  10. verifySuc("verifySuc", "4", "审核成功"),
  11. verifyFail("verifyFail", "5", "审核失败"),
  12. certSuc("certSuc", "6", "已发证");
  13. // 成员变量
  14. private String index; // value
  15. private String name; // key
  16. private String desc; // 描述
  17. /**
  18. * 构造方法
  19. * @param name
  20. * @param index
  21. * @param desc
  22. */
  23. private TrademarkApplyStatus(String name, String index, String desc) {
  24. this.name = name;
  25. this.index = index;
  26. this.desc = desc;
  27. }
  28. /**
  29. * 通过index获取对象
  30. *
  31. * @param index
  32. * @return
  33. */
  34. public static TrademarkApplyStatus getTrademarkApplyStatus(String index) {
  35. for (TrademarkApplyStatus c : TrademarkApplyStatus.values()) {
  36. if (c.getIndex().equals(index)) {
  37. return c;
  38. }
  39. }
  40. return null;
  41. }
  42. public String getName() {
  43. return name;
  44. }
  45. public void setName(String name) {
  46. this.name = name;
  47. }
  48. public String getIndex() {
  49. return index;
  50. }
  51. public void setIndex(String index) {
  52. this.index = index;
  53. }
  54. public String getDesc() {
  55. return desc;
  56. }
  57. public void setDesc(String desc) {
  58. this.desc = desc;
  59. }
  60. }