package com.zcxk.rmcp.api.vo;

import io.swagger.annotations.ApiModelProperty;
import com.github.pagehelper.Page;
import lombok.Data;

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

/**
 * @author Andy
 * @version V1.0
 * @description: 抄表率分页
 * @date 2021/7/26
 **/
@Data
public class ReadRatePageVo<T> implements Serializable {

    private static final long serialVersionUID = -4899829840696212229L;

    public ReadRatePageVo(){
    }

    @ApiModelProperty("总记录数")
    private long total;

    @ApiModelProperty(value="应抄数据")
    private int readTimes;

    @ApiModelProperty(value="实抄数据")
    private int realReadTimes;

    @ApiModelProperty(value="抄表率")
    private String readRate;

    @ApiModelProperty("结果集")
    private List<T> list;

    public ReadRatePageVo(List<T> list) {
        Page page = (Page) list;
        this.list = page;
        this.total = page.getTotal();
    }

    public ReadRatePageVo(List<T> list , long total){
        this.list = list ;
        this.total =total ;
    }

}
