package com.greenorange.promotion.common;

import com.greenorange.promotion.constant.CommonConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 分页请求
 */
@Data
public class PageRequest {

    /**
     * 当前页号
     */
    @Schema(description = "当前页码", example = "1")
    private long current = 1;

    /**
     * 页面大小
     */
    @Schema(description = "每页展示的记录条数", example = "10")
    private long pageSize = 10;

    /**
     * 排序字段
     */
    @Schema(description = "排序字段", example = "id")
    private String sortField;

    /**
     * 排序顺序（默认升序）
     */
    @Schema(description = "排序顺序((升:ascend;降:descend", example = "ascend")
    private String sortOrder = CommonConstant.SORT_ORDER_ASC;
}