package cn.estsh.i3plus.pojo.screen.model;

import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.screen.bean.ScrDataAuth;
import cn.estsh.i3plus.pojo.screen.bean.ScrDatasource;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 * @author Wynne.Lu
 * @date 2021/4/9 14:59
 * @desc
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("通用界面查询Model")
public class ScrSqlDmlModel implements Serializable {
    private static final long serialVersionUID = -177686438571101429L;

    @ApiModelProperty("工厂")
    private String organizeCode;

    @ApiModelProperty("操作人")
    private String userName;

    @ApiModelProperty("表名或视图名")
    private String table;

    @ApiModelProperty("字段")
    private List<String> fields;

    @ApiModelProperty("查询参数")
    private Map<String, Object> searchParams;

    @ApiModelProperty("插入参数")
    private Map<String, Object> insertParams;

    @ApiModelProperty("批量查询参数")
    private List<Map<String, Object>> insertBatchParams;

    @ApiModelProperty("更新参数")
    private Map<String, Object> updateParams;

    @ApiModelProperty("批量更新参数")
    private List<Map<String, Object>> updateBatchParams;

    @ApiModelProperty("分页参数")
    private Pager pager;

    @ApiModelProperty("排序")
    private String orderBy;

    @ApiModelProperty("数据源")
    private ScrDatasource datasource;

    @ApiModelProperty("主键")
    private Map<String, Object> primaryKeys;

    @ApiModelProperty("where条件补充")
    private String whereAppender;

    @ApiModelProperty("权限")
    private ScrDataAuth auth;


}
