2026-07-02 6e312c64c056acf479a6dd8393dd42a80b69b7d4
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package cn.iocoder.yudao.module.crm.enums.common;
 
import cn.hutool.core.util.ObjUtil;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
 
import java.util.Arrays;
 
/**
 * CRM 列表检索场景
 *
 * @author HUIHUI
 */
@Getter
@AllArgsConstructor
public enum CrmSceneTypeEnum implements ArrayValuable<Integer> {
 
    OWNER(1, "我负责的"),
    INVOLVED(2, "我参与的"),
    SUBORDINATE(3, "下属负责的");
 
    public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrmSceneTypeEnum::getType).toArray(Integer[]::new);
 
    /**
     * 场景类型
     */
    private final Integer type;
    /**
     * 场景名称
     */
    private final String name;
 
    public static boolean isOwner(Integer type) {
        return ObjUtil.equal(OWNER.getType(), type);
    }
 
    public static boolean isInvolved(Integer type) {
        return ObjUtil.equal(INVOLVED.getType(), type);
    }
 
    public static boolean isSubordinate(Integer type) {
        return ObjUtil.equal(SUBORDINATE.getType(), type);
    }
 
    @Override
    public Integer[] array() {
        return ARRAYS;
    }
 
}