package com.snack.server.module.file.vo;

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

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 上传文件返回
 */
@Data
@Schema(description = "上传文件返回")
public class FileUploadVO implements Serializable {

    @Schema(description = "文件 ID")
    private Long id;

    @Schema(description = "原始文件名")
    private String name;

    @Schema(description = "访问 URL（前端直接用此字段展示图片）")
    private String url;

    @Schema(description = "存储路径")
    private String path;

    @Schema(description = "文件大小（字节）")
    private Long size;

    @Schema(description = "MIME 类型")
    private String contentType;

    @Schema(description = "业务类型")
    private String bizType;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "上传时间")
    private LocalDateTime createTime;
}
