package com.YuyeTech.HeartRate.form;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.util.Date;

/**
 * 用户表单验证字段
 * @author:slambb
 * @date:2019/12/22
 */
@Data
public class UserForm {

//    @NotBlank(message = "userId不能为空")
    private String userId;

    @NotBlank(message = "用户名不能为空")
    private String username;

    @NotBlank(message = "性别不能为空")
    private String gender;

    @NotNull(message = "生日日期不能为空")
    @Past(message = "生日超过当前日期")
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    private Date birthday;

//    @NotBlank(message = "签名不能为空")
    private String signature;

    private String cityCode;

    private Double weight;

    private Double height;

    private Double waistline;//腰围

    private Double sHeartRate;//静态心率

}
