package com.greenorange.promotion.model.dto.userInfo;

import com.greenorange.promotion.annotation.EnumValue;
import com.greenorange.promotion.model.enums.UserRoleEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

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

/**
 * 验证码发送请求体
 */
@Data
@Schema(description = "验证码发送请求体", requiredProperties = {"phoneNumber", "userRole"})
public class VerificationCodeGetRequest implements Serializable {

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    @Schema(description = "手机号", example = "15888610253")
    private String phoneNumber;

    /**
     * 权限
     */
    @NotBlank(message = "权限不能为空")
    @EnumValue(enumClass = UserRoleEnum.class)
    @Schema(description = "权限", example = "user")
    private String userRole;

    @Serial
    private static final long serialVersionUID = 1L;
}
