package com.yida.data.user.dto;

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 保存家长信息请求类
 *
 * @author ZYJ
 * @date 2021/8/19
 */
@Data
@Builder
@ApiModel(value = "SaveParentInformationDTO", description = "保存家长信息请求类")
public class SaveParentInformationDTO implements Serializable {

    private static final long serialVersionUID = 7298060256240384500L;

    /**
     * 学生id集合
     */
    @NotEmpty
    @ApiModelProperty(value = "学生id集合")
    private List<Long> studentIdList;

    /**
     * 学校id
     */
    @NotNull
    @ApiModelProperty(value = "学校id")
    private Long schoolId;

    /**
     * 家长信息集合
     */
    @NotEmpty
    @ApiModelProperty("家长信息集合")
    private List<ParentInformationDTO> parentInfoList;

    @Data
    @Builder
    public static class ParentInformationDTO implements Serializable {

        private static final long serialVersionUID = 3702683332039705958L;

        /**
         * 家长身份
         */
        @NotBlank
        @ApiModelProperty(value = "家长身份")
        private String parentRole;

        /**
         * 家长手机号码
         */
        @NotBlank
        @ApiModelProperty(value = "家长手机号码")
        private String parentTelephone;
    }
}
