package com.fastbee.common.core.domain; import io.swagger.annotations.Api; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; import java.util.ArrayList; import java.util.List; @Api(tags = "分页结果") @Data public final class PageResult implements Serializable { @ApiModelProperty(value = "数据", required = true) private List list; @ApiModelProperty(value = "总量", required = true) private Long total; public PageResult() { } public PageResult(List list, Long total) { this.list = list; this.total = total; } public PageResult(Long total) { this.list = new ArrayList<>(); this.total = total; } public static PageResult empty() { return new PageResult<>(0L); } public static PageResult empty(Long total) { return new PageResult<>(total); } }