package com.xinelu.applet.vo.nurseapplogin;

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

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

/**
 * 注册信息Controller
 *
 * @author zhangheng
 * @date 2022-10-12
 */
@Data
public class NurseAppLoginVO implements Serializable {
    private static final long serialVersionUID = 4595042189710626431L;

    /**
     * 用户名称
     */
    @Length(max = 10, message = "用户名称不能超过10位!", groups = {Insert.class, Update.class})
    @NotBlank(message = "用户名称不能为空!", groups = {Insert.class, Update.class})
    private String patientName;

    /**
     * 所属区域编码
     */
    private String areaCode;

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

    /**
     * 登录密码
     */
    @Length(min = 6, max = 10, message = "密码不能超过10位!", groups = {Insert.class})
    @NotBlank(message = "密码不能为空!", groups = {Insert.class, Update.class})
    private String password;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
}
