package com.zkqy.system.entity;

import com.zkqy.common.core.domain.BaseEntity;

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


/**
 * 通用实体
 *
 * @author hanzihang
 * @date 2023/7/19 4:05 PM
 */
public class CommonEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 基本参数Map（例如tableName，pagesize。。。）
     */
    private Map<String, Object> basicMap;

    /**
     * 查询条件Map （查询当前表的条件字段k/v）
     */
    private Map<String, Object> queryMap;

    /**
     * 条件Map（例如修改时前端回传的唯一id标识，删除同理）
     */
    private Map<String, Object> conditionMap;

    /**
     * 回传Map（得到结果返回前端）
     */
    private Map<String, Object> resultMap;

    /**
     * 通用Map(新增时，修改时存放字段k/v)
     */
    private Map<String, Object> commMap;

    /**
     * 新增map
     */
    private List<Map<String, String>> addListMap;

    /**
     * excelMap
     */
    private String execlMap;


    /**
     * 点击按钮携带的参数
     */
    private Map<String, Object> btnParametersMap;

    public List<Map<String, String>> getAddListMap() {
        return addListMap;
    }

    public void setAddListMap(List<Map<String, String>> addListMap) {
        this.addListMap = addListMap;
    }

    public Map<String, Object> getBtnParametersMap() {
        return btnParametersMap;
    }

    public void setBtnParametersMap(Map<String, Object> btnParametersMap) {
        this.btnParametersMap = btnParametersMap;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("CommonEntity{");
        sb.append("basicMap=").append(basicMap);
        sb.append(", queryMap=").append(queryMap);
        sb.append(", conditionMap=").append(conditionMap);
        sb.append(", resultMap=").append(resultMap);
        sb.append(", commMap=").append(commMap);
        sb.append(", addListMap=").append(addListMap);
        sb.append(", execlMap='").append(execlMap).append('\'');
        sb.append(", btnParametersMap=").append(btnParametersMap);
        sb.append('}');
        return sb.toString();
    }

    public CommonEntity(Map<String, Object> basicMap, Map<String, Object> queryMap, Map<String, Object> conditionMap, Map<String, Object> resultMap, Map<String, Object> commMap, List<Map<String, String>> addListMap, String execlMap, Map<String, Object> btnParametersMap) {
        this.basicMap = basicMap;
        this.queryMap = queryMap;
        this.conditionMap = conditionMap;
        this.resultMap = resultMap;
        this.commMap = commMap;
        this.addListMap = addListMap;
        this.execlMap = execlMap;
        this.btnParametersMap = btnParametersMap;
    }

    public CommonEntity() {
        this.basicMap = new HashMap<>();
        this.queryMap = new HashMap<>();
        this.conditionMap = new HashMap<>();
        this.resultMap = new HashMap<>();
        this.commMap = new HashMap<>();
        this.addListMap = new ArrayList<>();
        this.execlMap = "";
        this.btnParametersMap = new HashMap<>();
    }

    public Map<String, Object> getBasicMap() {
        return basicMap;
    }

    public void setBasicMap(Map<String, Object> basicMap) {
        this.basicMap = basicMap;
    }

    public Map<String, Object> getQueryMap() {
        return queryMap;
    }

    public void setQueryMap(Map<String, Object> queryMap) {
        this.queryMap = queryMap;
    }

    public Map<String, Object> getConditionMap() {
        return conditionMap;
    }

    public void setConditionMap(Map<String, Object> conditionMap) {
        this.conditionMap = conditionMap;
    }

    public Map<String, Object> getResultMap() {
        return resultMap;
    }

    public void setResultMap(Map<String, Object> resultMap) {
        this.resultMap = resultMap;
    }

    public Map<String, Object> getCommMap() {
        return commMap;
    }

    public void setCommMap(Map<String, Object> commMap) {
        this.commMap = commMap;
    }

    public String getExeclMap() {
        return execlMap;
    }

    public void setExeclMap(String execlMap) {
        this.execlMap = execlMap;
    }

}