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

import com.greenorange.promotion.annotation.BaseEnum;
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.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import com.greenorange.promotion.common.PageRequest;

/**
 * 用户查询请求体，继承自分页请求 PageRequest
 */
@Data
@Schema(description = "用户查询请求体", requiredProperties = {"current", "pageSize"})
public class UserInfoQueryRequest extends PageRequest implements Serializable {

    /**
     * 用户ID
     */
    @Min(value = 1L, message = "用户ID不能小于1")
    @Schema(description = "用户ID", example = "1")
    private Long id;

    /**
     * 手机号
     */
    @Schema(description = "手机号", example = "15888610253")
    private String phoneNumber;


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


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