12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- package com.miniframe.generate.appcode;
- /**
- * 支付状态
- */
- public enum Depositorderbype {
- order("order", "00", "支付"),
- refund("refund", "01", "退款"),
- all("all", "all", "全部");
- // 成员变量
- private String index; // value
- private String name; // key
- private String desc; // 描述
-
- /**
- * 构造方法
- * @param name
- * @param index
- * @param desc
- */
- private Depositorderbype(String name, String index, String desc) {
- this.name = name;
- this.index = index;
- this.desc = desc;
- }
- /**
- * 通过index获取对象
- *
- * @param index
- * @return
- */
- public static Depositorderbype getDepositorderbype(String index) {
- for (Depositorderbype c : Depositorderbype.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;
- }
- }
|