package com.weather.vo.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

/**
 * @author : fengyuhao
 * @desc : 请求对象-测试信息
 * @update : 修改说明
 * @date : 2020/3/23-15:09
 */
@ApiModel(value="请求对象-分页信息")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class PageReq {


    @Builder.Default
    @ApiModelProperty(value="页索引,默认1",required = true)
    @NotNull(message = "页索引必传")
    @Range(max = 9999, min = 1, message = "页索引值介于1-9999之间")
    private Long page = 1L;


    @Builder.Default
    @ApiModelProperty(value="页大小，默认10条",required = true)
    @NotNull(message = "页大小必传")
    @Range(max = 500, min = 1, message = "排序值介于1-500之间")
    private Long limit = 10L;


}
