package com.zfire.jiasm.syncdata.plus.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 文件库
 * </p>
 *
 * @author gejiang
 * @since 2023-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="CommonFile对象", description="文件库")
public class CommonFile extends Model<CommonFile> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "文件主键")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "万能id")
    private String objId;

    @ApiModelProperty(value = "类型")
    private String objType;

    @ApiModelProperty(value = "文件类型（OTHER 未知 IMAGE 图片 VIDEO 视频 3 PDF文件 4 WORD文件 5 EXCEL文件 6 PPT")
    private String fileType;

    @ApiModelProperty(value = "文件地址")
    private String url;

    @ApiModelProperty(value = "压缩后小图片地址")
    private String smallUrl;

    @ApiModelProperty(value = "文件名")
    private String name;

    @ApiModelProperty(value = "文件名后缀")
    private String suffix;

    @ApiModelProperty(value = "文件大小（M）")
    private BigDecimal fileSize;

    @ApiModelProperty(value = "0有效 1无效")
    @TableLogic
    private Boolean del;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
