186 lines
4.5 KiB
Java
186 lines
4.5 KiB
Java
package com.muse.dto;
|
|
|
|
import java.net.URI;
|
|
import java.util.Objects;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import org.springframework.lang.Nullable;
|
|
import java.io.Serializable;
|
|
import java.time.OffsetDateTime;
|
|
import jakarta.validation.Valid;
|
|
import jakarta.validation.constraints.*;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
|
|
import java.util.*;
|
|
import jakarta.annotation.Generated;
|
|
|
|
/**
|
|
* PaginatedResult
|
|
*/
|
|
|
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T16:47:40.290595+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
|
|
public class PaginatedResult implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private Integer total;
|
|
|
|
private Integer pageNo;
|
|
|
|
private Integer pageSize;
|
|
|
|
@Valid
|
|
private List<Object> _list = new ArrayList<>();
|
|
|
|
public PaginatedResult() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public PaginatedResult(Integer total, Integer pageNo, Integer pageSize, List<Object> _list) {
|
|
this.total = total;
|
|
this.pageNo = pageNo;
|
|
this.pageSize = pageSize;
|
|
this._list = _list;
|
|
}
|
|
|
|
public PaginatedResult total(Integer total) {
|
|
this.total = total;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 总记录数
|
|
* @return total
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "total", example = "150", description = "总记录数", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("total")
|
|
public Integer getTotal() {
|
|
return total;
|
|
}
|
|
|
|
@JsonProperty("total")
|
|
public void setTotal(Integer total) {
|
|
this.total = total;
|
|
}
|
|
|
|
public PaginatedResult pageNo(Integer pageNo) {
|
|
this.pageNo = pageNo;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 当前页码
|
|
* @return pageNo
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "pageNo", example = "1", description = "当前页码", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("pageNo")
|
|
public Integer getPageNo() {
|
|
return pageNo;
|
|
}
|
|
|
|
@JsonProperty("pageNo")
|
|
public void setPageNo(Integer pageNo) {
|
|
this.pageNo = pageNo;
|
|
}
|
|
|
|
public PaginatedResult pageSize(Integer pageSize) {
|
|
this.pageSize = pageSize;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 每页条数
|
|
* @return pageSize
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "pageSize", example = "20", description = "每页条数", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("pageSize")
|
|
public Integer getPageSize() {
|
|
return pageSize;
|
|
}
|
|
|
|
@JsonProperty("pageSize")
|
|
public void setPageSize(Integer pageSize) {
|
|
this.pageSize = pageSize;
|
|
}
|
|
|
|
public PaginatedResult _list(List<Object> _list) {
|
|
this._list = _list;
|
|
return this;
|
|
}
|
|
|
|
public PaginatedResult addListItem(Object _listItem) {
|
|
if (this._list == null) {
|
|
this._list = new ArrayList<>();
|
|
}
|
|
this._list.add(_listItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 当前页数据列表
|
|
* @return _list
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "list", description = "当前页数据列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("list")
|
|
public List<Object> getList() {
|
|
return _list;
|
|
}
|
|
|
|
@JsonProperty("list")
|
|
public void setList(List<Object> _list) {
|
|
this._list = _list;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
PaginatedResult paginatedResult = (PaginatedResult) o;
|
|
return Objects.equals(this.total, paginatedResult.total) &&
|
|
Objects.equals(this.pageNo, paginatedResult.pageNo) &&
|
|
Objects.equals(this.pageSize, paginatedResult.pageSize) &&
|
|
Objects.equals(this._list, paginatedResult._list);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(total, pageNo, pageSize, _list);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class PaginatedResult {\n");
|
|
sb.append(" total: ").append(toIndentedString(total)).append("\n");
|
|
sb.append(" pageNo: ").append(toIndentedString(pageNo)).append("\n");
|
|
sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
|
|
sb.append(" _list: ").append(toIndentedString(_list)).append("\n");
|
|
sb.append("}");
|
|
return sb.toString();
|
|
}
|
|
|
|
/**
|
|
* Convert the given object to string with each line indented by 4 spaces
|
|
* (except the first line).
|
|
*/
|
|
private String toIndentedString(@Nullable Object o) {
|
|
return o == null ? "null" : o.toString().replace("\n", "\n ");
|
|
}
|
|
}
|
|
|