package com.qianwen.mdc.collect.enums;
|
|
/**
|
* 反馈类型
|
*/
|
public enum FeedbackTypeEnum {
|
TIME_RANGE_FEEDBACK(0, "时间段反馈"),
|
IMMEDIATE_FEEDBACK(1, "持续反馈"),
|
CANCEL_FEEDBACK(-1, "删除反馈");
|
|
private final Integer type;
|
private final String description;
|
|
FeedbackTypeEnum(final Integer type, final String description) {
|
this.type = type;
|
this.description = description;
|
}
|
|
public Integer getType() {
|
return this.type;
|
}
|
|
public String getDescription() {
|
return this.description;
|
}
|
|
public static FeedbackTypeEnum of(Integer type) {
|
if (type == null) {
|
return null;
|
}
|
FeedbackTypeEnum[] values = values();
|
for (FeedbackTypeEnum processEnum : values) {
|
if (processEnum.type.equals(type)) {
|
return processEnum;
|
}
|
}
|
return null;
|
}
|
|
public boolean isEqual(Integer value) {
|
return this.type.equals(value);
|
}
|
}
|