| | |
| | | package com.ks.consumerjdgiftcoupon.query; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.*; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @ApiModel(value = "测试查询",description = "测试查询") |
| | | public class TestQuery { |
| | | |
| | | // @AssertFalse(message = "所注解的元素必须是Boolean类型,且值为false") |
| | |
| | | // @Future(message = "日期是否在当前时间之后") |
| | | |
| | | |
| | | @ApiModelProperty(value = "昵称") |
| | | @NotEmpty(message = "注册失败,名字不能为空") |
| | | private String name; |
| | | @ApiModelProperty(value = "年龄") |
| | | @Max(value = 19, message = "该字段最大值为19") |
| | | @Min(value = 0, message = "该字段最小值为0") |
| | | private int age; |
| | | |
| | | @ApiModelProperty(value = "身高") |
| | | @DecimalMax(value = "3.00", message = "所注解的元素必须是数字,且值小于等于给定的值") |
| | | @DecimalMin(value = "0.00", message = "所注解的元素必须是数字,且值大于等于给定的值") |
| | | private BigDecimal height; |
| | | |
| | | |
| | | @ApiModelProperty(value = "出生日期") |
| | | @Past(message = "出生日期不能大于当前日期") |
| | | private Date birthday; |
| | | |
| | | @ApiModelProperty(value = "邮箱") |
| | | @Email(message = "邮件格式有误") |
| | | private String email;//邮件 |
| | | |
| | | |
| | | @ApiModelProperty(value = "签名") |
| | | @Pattern(regexp = "[abc]", message = "正则不匹配") |
| | | private String sign; |
| | | |