package com.fdkankan.web.request;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

@Data
public class RequestBase implements Serializable {

    private int pageNum = 1;

    private int pageSize = 10;

    private int start;

    private String orderBy = "id";

    /**
     * DESC-降序
     * ASC-升序
     */
    private String sortBy = "DESC";

    public String getOrderBy() {
        return StringUtils.isNotBlank(orderBy)? orderBy.trim() : null;
    }

    public String getSortBy() {
        return StringUtils.isNotBlank(sortBy)? sortBy.trim() : null;
    }
}
