package com.nuliji.tools;

import io.swagger.annotations.ApiModelProperty;

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

/**
 * Created by gaojie on 2017/11/7.
 */

public class PageMessage<T> implements Serializable {

    @ApiModelProperty(value = "记录列表", required = true)
    private List<T> list = null;

    @ApiModelProperty(value = "当前页数", required = true)
    private int page = 0;

    @ApiModelProperty(value = "每页记录数", required = true)
    private int size = 0;

    @ApiModelProperty(value = "记录总数", required = true)
    private long count = 0;

    public PageMessage(List<T> list, int page, int size, int count) {
        this.list = list;
        this.page = page;
        this.size = size;
        this.count = (long) count;
    }
    public PageMessage(List<T> list, int page, int size, long count) {
        this.list = list;
        this.page = page;
        this.size = size;
        this.count = count;
    }

    public int getPage() {
        return page;
    }

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

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
