package ink.wgink.pojo.result;

/**
 * @ClassName: SuccessResultList
 * @Description: 成功列表结果
 * @Author: WangGeng
 * @Date: 2019/3/3 12:21 AM
 * @Version: 1.0
 **/
public class SuccessResultList<List> extends SuccessResult {

    private static final long serialVersionUID = 7152646978840034322L;
    private List rows;
    private Integer page;
    private Long total;

    public SuccessResultList() {
    }

    public SuccessResultList(List rows, Integer page, Long total) {
        this.rows = rows;
        this.page = page;
        this.total = total;
    }

    public List getRows() {
        return rows;
    }

    public void setRows(List rows) {
        this.rows = rows;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"rows\":")
                .append(rows);
        sb.append(",\"page\":")
                .append(page);
        sb.append(",\"total\":")
                .append(total);
        sb.append('}');
        return sb.toString();
    }
}
