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