package org.springblade.openapi.common.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 *  分页参数
 * @author bfhuange
 * @since 2025/4/23
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Schema(description = "分页结果")
public class PageVO<T> implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 查询数据列表
     */
    @Schema(description = "查询数据列表")
    protected List<T> records = Collections.emptyList();
    /**
     * 总数
     */
    @Schema(description = "总数")
    protected long total = 0;
    /**
     * 总页数
     */
    @Schema(description = "总页数")
    protected long pages = 0;
}
