package com.reading.platform.dto.response;

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

/**
 * 文件上传响应
 */
@Data
@Schema(description = "文件上传响应")
public class FileUploadResponse {

    @Schema(description = "文件 URL", example = "https://example.com/files/abc123.jpg")
    private String fileUrl;

    @Schema(description = "文件名称", example = "image.jpg")
    private String fileName;

    @Schema(description = "文件大小", example = "1024")
    private Long fileSize;

    public static FileUploadResponse of(String fileUrl, String fileName, Long fileSize) {
        FileUploadResponse response = new FileUploadResponse();
        response.setFileUrl(fileUrl);
        response.setFileName(fileName);
        response.setFileSize(fileSize);
        return response;
    }
}
