123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- package com.miniframe.generate.appcode;
- /**
- * 审核状态
- */
- public enum AuditorState {
- def("def", "0", "默认"),
- pass("pass", "1", "通过"),
- reject("reject", "2", "驳回"),
- refuse("refuse", "3", "拒绝受理"),
- wait("wait", "4", "等待受理");
- // 成员变量
- private String index; // value
- private String name; // key
- private String desc; // 描述
-
- /**
- * 构造方法
- * @param name
- * @param index
- * @param desc
- */
- private AuditorState(String name, String index, String desc) {
- this.name = name;
- this.index = index;
- this.desc = desc;
- }
- /**
- * 通过index获取对象
- *
- * @param index
- * @return
- */
- public static AuditorState getAuditorState(String index) {
- for (AuditorState c : AuditorState.values()) {
- if (c.getIndex().equals(index)) {
- return c;
- }
- }
- return null;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getIndex() {
- return index;
- }
- public void setIndex(String index) {
- this.index = index;
- }
- public String getDesc() {
- return desc;
- }
- public void setDesc(String desc) {
- this.desc = desc;
- }
- }
|