package com.jeesharp.business.modules.member.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * 发送短信验证码请求
 *
 * @author jeesharp
 */
@Data
@Schema(description = "发送短信验证码请求")
public class SendSmsCodeDTO {

    @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13812345678")
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String mobile;

    /**
     * 验证码场景
     */
    @Schema(description = "场景：LOGIN-登录、REGISTER-注册、RESET_PWD-重置密码、BIND-绑定手机",
            requiredMode = Schema.RequiredMode.REQUIRED, example = "LOGIN")
    @NotBlank(message = "场景不能为空")
    private String scene;
}
