package com.pangu.common.core.page;

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

/**
 * 分页数据返回对象
 * @author pangu
 */
public class TableDataInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 状态码 */
    private int code;

    /** 消息 */
    private String msg;

    /** 总记录数 */
    private long total;

    /** 列表数据 */
    private List<?> rows;

    public TableDataInfo() {
    }

    public TableDataInfo(List<?> list, long total) {
        this.rows = list;
        this.total = total;
        this.code = 200;
        this.msg = "查询成功";
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public long getTotal() {
        return total;
    }

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

    public List<?> getRows() {
        return rows;
    }

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