package com.xunhong.erp.turbo.api.user.dto.qry;

import com.alibaba.cola.dto.Query;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author shenyifei
 */
@Data
@Schema(title = "验证码校验请求")
@EqualsAndHashCode(callSuper = true)
public class CaptchaQry extends Query {

	@Pattern(regexp = "^(1[3-9])\\d{9}$", message = "格式错误")
	@Size(min = 4, max = 20, message = "至少4个字符串，至多20个字符串")
	@NotBlank(message = "不能为空")
	@Schema(title = "登录账号", example = "18367831980")
	private String username;

	@NotBlank(message = "不能为空")
	@Schema(title = "验证码内容")
	private String captchaKey;

	@NotBlank(message = "不能为空")
	@Schema(title = "验证码内容")
	private String captchaCode;
}
