package com.zhgd.xmgl.modules.basicdata.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 上传文件信息
 * @author： pds
 * @date： 2023-02-24
 * @version： V1.0
 */
@Data
@TableName("file_detail")
@ApiModel(value = "FileDetail实体类", description = "FileDetail")
public class FileDetail implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 文件id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "文件id")
    private String id;
    /**
     * 文件访问地址
     */
    @Excel(name = "文件访问地址", width = 15)
    @ApiModelProperty(value = "文件访问地址")
    private String url;
    /**
     * 文件大小，单位字节
     */
    @Excel(name = "文件大小，单位字节", width = 15)
    @ApiModelProperty(value = "文件大小，单位字节")
    private Integer size;
    /**
     * 文件名称
     */
    @Excel(name = "文件名称", width = 15)
    @ApiModelProperty(value = "文件名称")
    private String filename;
    /**
     * 原始文件名
     */
    @Excel(name = "原始文件名", width = 15)
    @ApiModelProperty(value = "原始文件名")
    private String originalFilename;
    /**
     * 基础存储路径
     */
    @Excel(name = "基础存储路径", width = 15)
    @ApiModelProperty(value = "基础存储路径")
    private String basePath;
    /**
     * 存储路径
     */
    @Excel(name = "存储路径", width = 15)
    @ApiModelProperty(value = "存储路径")
    private String path;
    /**
     * 文件扩展名
     */
    @Excel(name = "文件扩展名", width = 15)
    @ApiModelProperty(value = "文件扩展名")
    private String ext;
    /**
     * MIME类型
     */
    @Excel(name = "MIME类型", width = 15)
    @ApiModelProperty(value = "MIME类型")
    private String contentType;
    /**
     * 存储平台
     */
    @Excel(name = "存储平台", width = 15)
    @ApiModelProperty(value = "存储平台")
    private String platform;
    /**
     * 缩略图访问路径
     */
    @Excel(name = "缩略图访问路径", width = 15)
    @ApiModelProperty(value = "缩略图访问路径")
    private String thUrl;
    /**
     * 缩略图名称
     */
    @Excel(name = "缩略图名称", width = 15)
    @ApiModelProperty(value = "缩略图名称")
    private String thFilename;
    /**
     * 缩略图大小，单位字节
     */
    @Excel(name = "缩略图大小，单位字节", width = 15)
    @ApiModelProperty(value = "缩略图大小，单位字节")
    private Integer thSize;
    /**
     * 缩略图MIME类型
     */
    @Excel(name = "缩略图MIME类型", width = 15)
    @ApiModelProperty(value = "缩略图MIME类型")
    private String thContentType;
    /**
     * 文件所属对象id
     */
    @Excel(name = "文件所属对象id", width = 15)
    @ApiModelProperty(value = "文件所属对象id")
    private String objectId;
    /**
     * 文件所属对象类型，例如用户头像，评价图片
     */
    @Excel(name = "文件所属对象类型，例如用户头像，评价图片", width = 15)
    @ApiModelProperty(value = "文件所属对象类型，例如用户头像，评价图片")
    private String objectType;
    /**
     * 附加属性
     */
    @Excel(name = "附加属性", width = 15)
    @ApiModelProperty(value = "附加属性")
    private String attr;
    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    public static final String COL_ID = "id";

    public static final String COL_URL = "url";

    public static final String COL_SIZE = "size";

    public static final String COL_FILENAME = "filename";

    public static final String COL_ORIGINAL_FILENAME = "original_filename";

    public static final String COL_BASE_PATH = "base_path";

    public static final String COL_PATH = "path";

    public static final String COL_EXT = "ext";

    public static final String COL_CONTENT_TYPE = "content_type";

    public static final String COL_PLATFORM = "platform";

    public static final String COL_TH_URL = "th_url";

    public static final String COL_TH_FILENAME = "th_filename";

    public static final String COL_TH_SIZE = "th_size";

    public static final String COL_TH_CONTENT_TYPE = "th_content_type";

    public static final String COL_OBJECT_ID = "object_id";

    public static final String COL_OBJECT_TYPE = "object_type";

    public static final String COL_ATTR = "attr";

    public static final String COL_CREATE_TIME = "create_time";
}
