| | |
| | | package com.iailab.framework.common.enums; |
| | | |
| | | import cn.hutool.core.util.ObjUtil; |
| | | import com.iailab.framework.common.core.IntArrayValuable; |
| | | import com.iailab.framework.common.core.ArrayValuable; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | |
| | | */ |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum CommonStatusEnum implements IntArrayValuable { |
| | | public enum CommonStatusEnum implements ArrayValuable { |
| | | |
| | | ENABLE(0, "开启"), |
| | | DISABLE(1, "关闭"); |
| | | |
| | | public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CommonStatusEnum::getStatus).toArray(); |
| | | public static final Integer[] ARRAYS = Arrays.stream(values()).map(CommonStatusEnum::getStatus).toArray(Integer[]::new); |
| | | |
| | | /** |
| | | * 状态值 |
| | |
| | | private final String name; |
| | | |
| | | @Override |
| | | public int[] array() { |
| | | public Integer[] array() { |
| | | return ARRAYS; |
| | | } |
| | | |