package com.xinelu.applet.dto.appletlogin;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.custominterface.Insert;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * @author ljh
 * @version 1.0
 * Create by 2023/2/27 11:14
 */
@Data
public class PatientInfoPersonalCenterDTO implements Serializable {
    private static final long serialVersionUID = 6456221141849992770L;
    /**
     * 用户id
     */
    private Long patientId;

    /**
     * 姓名
     */
    @NotBlank(message = "姓名不能为空", groups = {Insert.class})
    @Length(max = 20, message = "姓名不能超过20字符", groups = {Insert.class})
    private String patientName;

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空", groups = {Insert.class})
    @Length(max = 11, message = "手机号码不能超过11位", groups = {Insert.class})
    private String phone;

    /**
     * 身份证号
     */
    @NotBlank(message = "身份证号不能为空", groups = {Insert.class})
    @Length(max = 18, message = "身份证号不能超过18位", groups = {Insert.class})
    private String cardNo;

    /**
     * 个人头像地址
     */
    private String headPictureUrl;

    /**
     * 性别
     */
    private String sex;

    /**
     * 出生日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthDate;


    /**
     * 所在位置名称
     */
    private String locationName;

    /**
     * 居住地址
     */
    @NotBlank(message = "居住地址不能为空", groups = {Insert.class})
    private String address;

}
