package com.example.demo.dto.response.admin;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;


@ApiModel(value = "BasePageResponse", description = "分页响应")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class BasePageResponse<T> {

    private static final long serialVersionUID = -6286877789934480026L;

    @ApiModelProperty(value = "总数量", notes = "总数量", required = false, hidden = false)
    private Long total;

    @ApiModelProperty(value = "总页数")
    private Long pages;

    @ApiModelProperty(value = "当前页最大容纳数据量")
    private Long size;

    @ApiModelProperty(value = "当前页码")
    private Long current;

    @ApiModelProperty(value = "当前页数据量，记录该页有多少数据")
    private int dataNum;

    @ApiModelProperty(value = "主要业务数据体", notes = "主要业务数据体", required = false, hidden = false)
    private T data;

}