1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| package com.iailab.module.bpm.enums.definition;
|
| import cn.hutool.core.util.ArrayUtil;
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| /**
| * BPM 表单权限的枚举
| *
| * @author hou
| */
| @Getter
| @AllArgsConstructor
| public enum BpmFieldPermissionEnum {
|
| READ(1, "只读"),
| WRITE(2, "可编辑"),
| NONE(3, "隐藏");
|
| /**
| * 权限
| */
| private final Integer permission;
| /**
| * 名字
| */
| private final String name;
|
| public static BpmFieldPermissionEnum valueOf(Integer permission) {
| return ArrayUtil.firstMatch(item -> item.getPermission().equals(permission), values());
| }
|
| }
|
|