package com.hhh.cloud.framework.demo.clazz.model;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class StudentUpdateVo {

    /**
     * 主键
     */
    @NotNull(message = "查询条件不足")
    private String id;

    /**
     * 姓名
     */
    @NotBlank(message = "姓名不能为空")
    private String name;

    /**
     * 年龄
     */
    @Range(min = 6, max = 30, message = "年龄必须是数字，范围6~30")
    private Integer age;

    /**
     * 性别
     */
    @Range(min = 0, max = 1, message = "性别格式不正确")
    private Integer gender;

    /**
     * 班级
     */
    @NotBlank(message = "班级不能为空")
    private String classNo;
}
