package com.matrix.system.enums;
|
|
import com.google.common.collect.Lists;
|
import com.matrix.core.enums.EnumApiShowAble;
|
import com.matrix.core.enums.EnumsShowVo;
|
|
import java.util.List;
|
import java.util.stream.Collectors;
|
|
public enum WeekTypeEnum implements EnumApiShowAble {
|
|
|
WEEK_TYPE_ONE(1, "周一"),
|
WEEK_TYPE_TWO(2, "周二"),
|
WEEK_TYPE_THREE(3, "周三"),
|
WEEK_TYPE_FOUR(4, "周四"),
|
WEEK_TYPE_FIVE(5, "周五"),
|
WEEK_TYPE_SIX(6, "周六"),
|
WEEK_TYPE_SEVEN(7, "周日");
|
|
private Integer value;
|
|
private String displayName;
|
|
WeekTypeEnum(Integer value, String displayName) {
|
this.value = value;
|
this.displayName = displayName;
|
}
|
|
public Integer getValue() {
|
return value;
|
}
|
|
public String getDisplayName() {
|
return displayName;
|
}
|
|
@Override
|
public String getEnumCode() {
|
return "weekType";
|
}
|
|
@Override
|
public List<EnumsShowVo> getEnumsShowVos() {
|
return Lists.newArrayList(values()).stream().map(item ->
|
EnumsShowVo.builder()
|
.displayName(item.getDisplayName())
|
.value(item.value)
|
.build()
|
).collect(Collectors.toList());
|
}
|
}
|