package com.sdtool.common.datas;

import java.util.stream.Stream;

/**
 * Created by jlutt on 2021-09-24
 * 数据权限模块
 * @author jlutt
 */
public enum DataPurviewModule {

    ORDER(1, "订单查看", 0, 0),

    PRINTBILL(2, "施工单查看", 0 ,0),

    PRODUCT(3, "产品查看", 2, 1),

    SURVEY_VIEW(200,"部门调查单查看的权限", 1, 1);

    private int value;

    private String moduleName;

    /**
     * 查看范围，0人员 1部门 2产品档案
     */
    private int viewKind;

    /**
     * 配置位置，0集中界面配置 1单独界面配置
     */
    private int configPlace;

    DataPurviewModule(int value, String moduleName, int viewKind, int configPlace) {
        this.value = value;
        this.moduleName = moduleName;
        this.viewKind = viewKind;
        this.configPlace = configPlace;
    }

    public static Stream<DataPurviewModule> stream() {
        return Stream.of(DataPurviewModule.values());
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    public int getViewKind() {
        return viewKind;
    }

    public void setViewKind(int viewKind) {
        this.viewKind = viewKind;
    }

    public int getConfigPlace() {
        return configPlace;
    }

    public void setConfigPlace(int configPlace) {
        this.configPlace = configPlace;
    }
}
