| | |
| | | package com.kidgrow.order.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.kidgrow.common.annotation.DateValidator; |
| | | import com.kidgrow.common.constant.BaseConstants; |
| | | import com.kidgrow.common.model.SuperModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.hibernate.validator.constraints.*; |
| | | import org.hibernate.validator.constraints.Email; |
| | | import org.hibernate.validator.constraints.Length; |
| | | import org.hibernate.validator.constraints.NotEmpty; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Pattern; |
| | | import java.util.Date; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | // |
| | | @NotBlank(message = "订单名不能为空") |
| | | @NotEmpty(message = "订单名不能为空") |
| | | private String name; |
| | | // |
| | | |
| | | @Length(min=5, max=10,message = "用户名长度为5-10") |
| | | @NotBlank(message = "用户名不能为空") |
| | | @NotEmpty(message = "用户名不能为空") |
| | | private String namecn; |
| | | |
| | | @DateValidator(minDate = "2019-01-01",message = "有效期限不能早于2019-01-01") |
| | | private Date addDate; |
| | | |
| | | |
| | | @NotEmpty(message = "邮箱不能为空") |
| | | @Email(message = "邮箱格式不正确") |
| | | private String mail; |
| | | |
| | | @NotEmpty(message = "手机号不能为空") |
| | | @Pattern(regexp= BaseConstants.PHONE_REGEXP,message = "手机号格式不正确") |
| | | private String phone; |
| | | |
| | | @NotNull(message = "年龄不能为空") |
| | | @Min(value = 0,message = "年龄必须大于等于0") |
| | | @Max(value = 200,message = "年龄不能大于200") |
| | | private Integer age; |
| | | |
| | | @NotNull(message = "性别不能为空") |
| | | @Min(value = 0,message = "性别,1-男,2-女,0-未知") |
| | | @Max(value = 2,message = "性别,1-男,2-女,0-未知") |
| | | private Integer sex; |
| | | } |