package com.schoolinout.system.domain.dto;

import com.schoolinout.common.validate.groups.Login;
import com.schoolinout.common.validate.groups.Save;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotBlank;

/**
 * @author sakura
 * @date 2024/1/9 17:17:19 Tue
 */
@Schema(name = "用户端家长登入实体")
public class ApiParentDto {

    @Schema(description = "家长姓名")
    @NotBlank(message = "姓名不能为空", groups = {Save.class})
    private String name;
    @Schema(description = "电话", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "手机号不能为空", groups = {Save.class, Login.class})
    private String phone;
    @Schema(description = "手机号验证码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "手机号验证码不能为空", groups = {Login.class})
    private String code;
    @Schema(description = "学号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "学号不能为空", groups = {Save.class, Login.class})
    private String studentNum;

    @Schema(description = "绑定关系；取的是/app/parent/list/relation 这个接口的值", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "绑定关系不能为空", groups = {Save.class})
    private String relation;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRelation() {
        return relation;
    }

    public void setRelation(String relation) {
        this.relation = relation;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getStudentNum() {
        return studentNum;
    }

    public void setStudentNum(String studentNum) {
        this.studentNum = studentNum;
    }
}
