package com.yonge.cooleshow.tenant.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDate;

@ApiModel("学生入参模型")
@Data
public class StudentVo {

    @Data
    @ApiModel("添加/修改学生")
    public static class Student {

        @ApiModelProperty("id")
        private Long id;

        @ApiModelProperty("所属机构，开放接口必填")
        private Long tenantId;

        @ApiModelProperty("机构小组ID")
        private Long tenantGroupId;

        @ApiModelProperty("姓名")
        @NotNull
        private String name;

        @ApiModelProperty("性别。0：女 1：男")
        @NotNull
        private Integer gender;

        @ApiModelProperty("生日")
        private LocalDate birthdate;

        @ApiModelProperty("手机号码")
        @Pattern(regexp = "^1\\d{10}$", message = "请输入正确的手机号码")
        private String phone;

        @ApiModelProperty("头像")
        private String avatar;

        @ApiModelProperty("声部，多个用逗号隔开")
        private String subjectId;

        @ApiModelProperty("是否换绑机构,开放接口使用参数")
        private Boolean updateTenant;

        @ApiModelProperty("短信验证码")
        private String code;

        @ApiModelProperty("登陆验证码")
        private Boolean loginCode;
    }
}
