| | |
| | | package com.iailab.module.system.enums.permission; |
| | | |
| | | import com.iailab.framework.common.core.IntArrayValuable; |
| | | import com.iailab.framework.common.core.ArrayValuable; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | |
| | | */ |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum DataScopeEnum implements IntArrayValuable { |
| | | public enum DataScopeEnum implements ArrayValuable { |
| | | |
| | | ALL(1), // 全部数据权限 |
| | | |
| | |
| | | */ |
| | | private final Integer scope; |
| | | |
| | | public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DataScopeEnum::getScope).toArray(); |
| | | public static final Integer[] ARRAYS = Arrays.stream(values()).map(DataScopeEnum::getScope).toArray(Integer[]::new); |
| | | |
| | | @Override |
| | | public int[] array() { |
| | | public Integer[] array() { |
| | | return ARRAYS; |
| | | } |
| | | |