package com.ruoyi.ss.user.domain.dto;

import com.ruoyi.common.utils.RegexpUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 更换用户手机号DTO
 * @author wjh
 * 2024/10/11
 */
@Data
public class UserChangeMobileDTO {

    @ApiModelProperty("旧手机号验证码")
    private String oldCode;

    @ApiModelProperty("新手机号")
    @NotBlank(message = "新手机号不能为空")
    @Pattern(regexp = RegexpUtils.MOBILE_PHONE_REGEXP, message = "新手机号格式错误")
    private String newMobile;

    @ApiModelProperty("新手机号验证码")
    @NotBlank(message = "新手机号验证码不允许为空")
    private String newCode;

}
