package com.nanri.aiimage.modules.productrisk.model.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(description = "单店结果项：列表接口与任务详情中共用，对应 biz_file_result 一行 + 任务/请求衍生字段")
public class ProductRiskResultItemVo {

    @Schema(description = "结果行主键 biz_file_result.id；删除单条、下载 zip 时使用", example = "1001")
    private Long resultId;

    @Schema(description = "所属任务 id biz_file_task.id", example = "200")
    private Long taskId;

    @JsonProperty("shopName")
    @Schema(description = "店铺名称（列表接口中可能与库内规范化名一致；详情中会尽量合并创建任务时的展示名）")
    private String shopName;

    @JsonProperty("shopId")
    @Schema(description = "店铺 ID（紫鸟）")
    private String shopId;

    @Schema(description = "平台")
    private String platform;

    @JsonProperty("companyName")
    @Schema(description = "公司名称")
    private String companyName;

    @Schema(description = "创建任务时是否已匹配（列表中一般为 true）")
    private boolean matched;

    @JsonProperty("matchStatus")
    @Schema(description = "匹配状态码，含义同 ProductRiskShopQueueItemVo.matchStatus")
    private String matchStatus;

    @JsonProperty("matchMessage")
    @Schema(description = "匹配说明文案")
    private String matchMessage;

    @JsonProperty("taskStatus")
    @Schema(description = "所属任务当前状态：RUNNING / SUCCESS / FAILED，与各店行一致")
    private String taskStatus;

    @Schema(description = "该店是否已成功生成结果文件；null 表示未出终态时可不按布尔处理")
    private Boolean success;

    @Schema(description = "该店失败时的错误信息")
    private String error;

    @JsonProperty("outputFilename")
    @Schema(description = "生成的 zip 文件名（成功后有值）")
    private String outputFilename;

    @JsonProperty("downloadUrl")
    @Schema(description = "预签名下载 URL（列表里可能带；直链下载也可用 GET /results/{resultId}/download）")
    private String downloadUrl;
}
