| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.basic.dto.StorageBlobDTO; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * 通用文件上传的附件信息 实体类 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-05-29 |
| | | */ |
| | | @Data |
| | | @TableName("storage_attachment") |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Date updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | /** |
| | | * 逻辑删除 |
| | | */ |
| | |
| | | * 关联的记录类型 |
| | | */ |
| | | @TableField(value = "record_type") |
| | | private Long recordType; |
| | | private String recordType; |
| | | /** |
| | | * 关联的记录id |
| | | */ |
| | | @TableField(value = "record_id") |
| | | private Long recordId; |
| | | /** |
| | | * 类型名称, 如: file, avatar (区分同一条记录不同类型的附件) |
| | | * 文件用途, 如: file, avatar (区分同一条记录不同类型的附件) |
| | | */ |
| | | @TableField(value = "name") |
| | | private String name; |
| | | @TableField(value = "application") |
| | | private String application; |
| | | /** |
| | | * 关联storage_blob记录id |
| | | */ |
| | | @TableField(value = "storage_blob_id") |
| | | private Long storageBlobId; |
| | | |
| | | @TableField(exist = false) |
| | | private StorageBlobDTO storageBlobDTO; |
| | | |
| | | public StorageAttachment(String fileType, Long recordType, Long recordId) { |
| | | this.name = fileType; |
| | | this.recordType = recordType; |
| | | this.recordId = recordId; |
| | | } |
| | | } |