package com.auth.dao.base.entity;

import com.auth.common.model.common.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_file")
@Schema(name = "File-系统文件存储实体类", title = "系统文件存储", description = "系统文件存储的实体类对象")
public class FileEntity extends BaseEntity {

    @Schema(name = "fileUid", title = "文件唯一标识(可用于外部引用)")
    private String fileUid;

    @Schema(name = "originalName", title = "原始文件名")
    private String originalName;

    @Schema(name = "storageName", title = "存储文件名")
    private String storageName;

    @Schema(name = "filePath", title = "文件存储路径(相对路径)")
    private String filePath;

    @Schema(name = "fullUrl", title = "完整访问URL")
    private String fullUrl;

    @Schema(name = "fileSize", title = "文件大小(字节)")
    private Long fileSize;

    @Schema(name = "fileType", title = "文件MIME类型")
    private String fileType;

    @Schema(name = "fileExtension", title = "文件扩展名")
    private String fileExtension;

    @Schema(name = "fileHash", title = "文件哈希值(用于去重)")
    private String fileHash;

    @Schema(name = "downloadCount", title = "下载次数")
    private Integer downloadCount;

    @Schema(name = "storageType", title = "存储类型(1=本地,2=OSS,3=七牛云,4=阿里云,5=腾讯云)")
    private Integer storageType;

    @Schema(name = "fileStatus", title = "文件状态(0=临时,1=正式,2=归档,3=已删除)")
    private Integer fileStatus;

    @Schema(name = "businessType", title = "业务类型(用于分类)")
    private String businessType;

    @Schema(name = "businessId", title = "关联业务ID")
    private Long businessId;

    @Schema(name = "isDeleted", title = "逻辑删除(0=未删除,1=已删除)")
    private Boolean isDeleted;

}