
package com.tmerclub.cloud.auth.dto;

import com.tmerclub.cloud.common.util.PrincipalUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;

/**
 * 忘记密码
 *
 * @author tmerclub
 * @date 2021/01/29
 */
@Data
@ToString
public class ForgetPasswordDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @NotNull(message = "newPassword NotNull")
    @Schema(description = "新密码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String newPassword;

    @NotNull
    @Schema(description = "系统类型 0普通用户 1商家端 2平台端", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer sysType;

    @Schema(description = "校验登陆注册验证码成功的标识")
    private String checkUpdatePwdSmsFlag;

    @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    @Pattern(regexp = PrincipalUtil.MOBILE_REGEXP, message = "请输入正确的手机号")
    @NotBlank(message = "手机号不能为空")
    private String mobile;


}
