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")
    private String miniprogramQrCodeUrl;

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

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

}
