/**
* @author 姜兴琪
*/
package cn.bycs.online.dealer.vo;
/**
* @author jiangxingqi
* 车辆状态枚举
*/
public enum NewCarStatusEnum {
DRAFT("草稿",1),
SUBMIT_RELEASE("提交发布",2),
PUBLISH_SUCCESS("发布成功",3),
AUDIT_DENY("审核不通过",4);
private String status;
private int key;
private NewCarStatusEnum(String status,int key) {
this.status = status;
this.key = key;
}
/**
* @return the key
*/
public int getKey() {
return key;
}
/**
* @param key the key to set
*/
public void setKey(int key) {
this.key = key;
}
/**
* @param status the status to set
*/
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public static String getStatus(int i) {
for (NewCarStatusEnum e : values()) {
if (e.getKey() == i) {
return e.getStatus();
}
}
return null;
}
public static Integer getKey(String status) {
for (NewCarStatusEnum e : values()) {
if (e.getStatus().equals(status)) {
return e.getKey();
}
}
return null;
}
}