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

import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.report.bean.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiParam;
import lombok.Data;

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

/**
 * @Description :
 * @Reference :
 * @Author : Adair Peng
 * @CreateDate : 2019-01-20 14:05
 * @Modify:
 **/
@Data
public class TemplateModel implements Serializable {

    private static final long serialVersionUID = -6385070202088819367L;
    @ApiParam(value = "视图ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long viewId;

    @ApiParam(value = "视图类型")
    private Integer viewType;

    @ApiParam(value = "视图名称")
    private String viewName;

    @ApiParam(value = "返回信息")
    private String resultMessage;

    @ApiParam(value = "查询对象")
    private BrPojo pojo;

    @ApiParam(value = "对象连接")
    private List<BrPojo> joinList;

    @ApiParam(value = "对象晒算信息")
    private BrPojoFilter filter;

    @ApiParam(value = "查询条件")
    private List<BrPojoFilterAttr> whereAttrList;

    @ApiParam(value = "分组条件")
    private List<BrPojoFilterAttr> groupAttrList;

    @ApiParam(value = "排序条件")
    private BrPojoView view;

    @ApiParam(value = "排序条件")
    private List<BrPojoViewAttr> orderAttrList;

    @ApiParam(value = "显示属性")
    private List<BrPojoViewAttr> viewAttrList;

    @ApiParam(value = "显示属性别名")
    private List<String> viewAttrAliasList;

    @ApiParam(value = "跨服务调用返回数据")
    private BaseResultBean cloudResultBean;

    @ApiParam(value = "跨服务调用解析后数据")
    private List<Map<String, Object>> rows;

    @ApiParam(value = "跨服务调用解析后数据")
    private String option;

    @ApiParam(value = "分页参数")
    private Pager pager;

    @ApiParam(value = "页面查询条件")
    private Map<String, Object> findParam;

    @ApiParam("执行 HQL ")
    private String selectSql;

    @ApiParam("执行 HQL 返回数量")
    private String countSql;

    @ApiParam("执行 HQL 返回数量")
    private String querySql;
}
