package cn.iocoder.yudao.module.knowledge.entity;


import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.knowledge.annotation.ExcelOut;
import cn.iocoder.yudao.module.knowledge.controller.responsevo.FileInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * 档案表(TArchives)表实体类
 *
 * @author makejava
 * @since 2024-04-11 10:25:58
 */
@TableName("t_archives")
@Data
@Schema(description = "档案类")
public class TArchives extends BaseDO {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(
            description = "父id",
            example = "11"
    )
    private Long parentId;

    @Schema(
            description = "文件的唯一编码",
            example = "a01"
    )
    private String code;

    @Schema(
            description = "类型 1 ：图片 2：视频 3：文档 4 ：音频",
            example = "1"
    )
    private String type;

    @Schema(
            description = "文件原名称",
            example = "文件1"
    )
    @ExcelOut(name = "文件名称", sort = 1, width = 20)
    private String originalFilename;

    @Schema(
            description = "文件现名称",
            example = "文件2"
    )
    private String curFilename;

    @Schema(
            description = "排序",
            example = "1"
    )
    private String orders;

    @Schema(
            description = "文件真实存在的地方",
            example = "/d/test"
    )
    @ExcelOut(name = "文件地址", sort = 3, width = 20,isFileUrl = true)
    private String fileUrl;

    @Schema(
            description = "文件大小",
            example = "10KB"
    )
    @ExcelOut(name = "文件大小", sort = 2, width = 20)
    private Long fileSize;

    @Schema(
            description = "是否是文件夹 0：文件夹 1:文件",
            example = "0"
    )
    private Integer isDir;


    @Schema(
            description = "是否移到回收站 0：是 1：否",
            example = "0"
    )
    private Integer isRecycled;

    @Schema(
            description = "创建者",
            example = "admin"
    )
    private String creator;


    @Schema(
            description = "创建者id",
            example = "1"
    )
    private String creatorId;

    @Schema(
            description = "文件信息",
            example = "10KB，jpg"
    )
    @TableField(exist = false)
    private FileInfo fileInfo;


}

