package com.cico.nest.lcdp.boot.api.system.sms.dto.code;

import com.cico.nest.lcdp.boot.api.system.enums.sms.SmsSceneEnum;
import com.cico.nest.lcdp.framework.common.validation.InEnum;
import com.cico.nest.lcdp.framework.common.validation.Mobile;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;


/**
 * 短信验证码的发送 Request DTO
 *
 * @author zws
 */
@Data
public class SmsCodeSendReqDTO {

    /**
     * 手机号
     */
    @Mobile
    @NotEmpty(message = "手机号不能为空")
    private String mobile;
    /**
     * 发送场景
     */
    @NotNull(message = "发送场景不能为空")
    @InEnum(SmsSceneEnum.class)
    private Integer scene;
    /**
     * 发送 IP
     */
    @NotEmpty(message = "发送 IP 不能为空")
    private String createIp;

    public SmsCodeSendReqDTO setMobile(String mobile) {
        this.mobile = mobile;
        return this;
    }

    public SmsCodeSendReqDTO setScene(Integer scene) {
        this.scene = scene;
        return this;
    }

    public SmsCodeSendReqDTO setCreateIp(String createIp) {
        this.createIp = createIp;
        return this;
    }
}
