package com.gxwebsoft.auto.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 扫码登录确认请求
 *
 * @author 科技小王子
 * @since 2025-08-31
 */
@Data
@Schema(description = "扫码登录确认请求")
public class QrLoginConfirmRequest {

    @Schema(description = "扫码登录token")
    @NotBlank(message = "token不能为空")
    private String token;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "登录平台: web-网页端, app-移动应用, miniprogram-微信小程序")
    private String platform;

    @Schema(description = "微信小程序相关信息")
    private WechatMiniProgramInfo wechatInfo;

    /**
     * 微信小程序信息
     */
    @Data
    @Schema(description = "微信小程序信息")
    public static class WechatMiniProgramInfo {
        @Schema(description = "微信openid")
        private String openid;

        @Schema(description = "微信unionid")
        private String unionid;

        @Schema(description = "微信昵称")
        private String nickname;

        @Schema(description = "微信头像")
        private String avatar;
    }

}
