wangmengmeng
2024-12-24 24432a361d5c6bd6f3d8c008693e9f1155d62517
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package com.dji.sdk.common;
 
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
 
/**
 * Used for paging display. These field names cannot be changed.
 * Because they need to be the same as the pilot.
 * @author sean
 * @version 0.3
 * @date 2021/12/22
 */
@Schema(description = "Used for paging display")
public class Pagination {
 
    /**
     * The current page number.
     */
    @Schema(description = "The current page number.", example = "1")
    private long page;
 
    /**
     * The amount of data displayed per page.
     */
    @Schema(description = "The amount of data displayed per page.", example = "10")
    @JsonProperty("page_size")
    private long pageSize;
 
    /**
     * The total amount of all data.
     */
    @Schema(description = "The total amount of all data.", example = "10")
    private long total;
 
    public Pagination() {
    }
 
    public Pagination(long page, long pageSize, long total) {
        this.page = page;
        this.pageSize = pageSize;
        this.total = total;
    }
 
    @Override
    public String toString() {
        return "Pagination{" +
                "page=" + page +
                ", pageSize=" + pageSize +
                ", total=" + total +
                '}';
    }
 
    public long getPage() {
        return page;
    }
 
    public Pagination setPage(long page) {
        this.page = page;
        return this;
    }
 
    public long getPageSize() {
        return pageSize;
    }
 
    public Pagination setPageSize(long pageSize) {
        this.pageSize = pageSize;
        return this;
    }
 
    public long getTotal() {
        return total;
    }
 
    public Pagination setTotal(long total) {
        this.total = total;
        return this;
    }
}