package com.gxwebsoft.auto.dto;

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

/**
 * 扫码登录生成响应
 *
 * @author 科技小王子
 * @since 2025-08-31
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "扫码登录生成响应")
public class QrLoginGenerateResponse {

    @Schema(description = "扫码登录token")
    private String token;

    @Schema(description = "二维码内容(APP扫码使用)")
    private String qrCodeContent;

    @Schema(description = "微信小程序页面路径")
    private String miniprogramPath;

    @Schema(description = "微信小程序码图片URL（已废弃，改用base64）")
    private String miniprogramQrCodeUrl;

    @Schema(description = "微信小程序码图片Base64（扫码后直接打开小程序，优先使用）")
    private String miniprogramQrCode;

    @Schema(description = "过期时间(秒)")
    private Long expiresIn;

    @Schema(description = "微信扫码登录H5页面URL")
    private String wechatScanUrl;

    @Schema(description = "微信公众号AppID")
    private String wechatAppId;

    @Schema(description = "微信公众号带参数二维码图片URL")
    private String wechatQrCodeUrl;

    // 保持向后兼容的构造函数
    public QrLoginGenerateResponse(String token, String qrCodeContent, Long expiresIn) {
        this.token = token;
        this.qrCodeContent = qrCodeContent;
        this.expiresIn = expiresIn;
    }

}
