package com.dsk.system.domain.business.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lcl
 * @create 2023/8/14
 */
@Data
@NoArgsConstructor
public class BusinessSearchDto implements Serializable {
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 状态
     */
    private Integer status;

    /**
     * 数据权限
     */
    private Map<String, Object> params;

    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }

    public BusinessSearchDto(Long userId) {
        this.userId = userId;
    }

    public BusinessSearchDto(Long userId, Integer status) {
        this.userId = userId;
        this.status = status;
    }
}
