| New file | 
 |  |  | 
 |  |  | package com.dy.pipIrrGlobal.pojoFi; | 
 |  |  |  | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
 |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
 |  |  | import com.baomidou.mybatisplus.annotation.*; | 
 |  |  | import com.dy.common.po.BaseEntity; | 
 |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
 |  |  | import lombok.*; | 
 |  |  |  | 
 |  |  | import java.util.Date; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * 上载的文件信息 | 
 |  |  |  */ | 
 |  |  |  | 
 |  |  | @TableName(value="web_file", autoResultMap = true) | 
 |  |  | @Data | 
 |  |  | @Builder | 
 |  |  | @ToString | 
 |  |  | @NoArgsConstructor | 
 |  |  | @AllArgsConstructor | 
 |  |  | public class WebFile implements BaseEntity { | 
 |  |  |  | 
 |  |  |     public static final long serialVersionUID = 202410190947001L; | 
 |  |  |     /** | 
 |  |  |      * 主键 | 
 |  |  |      */ | 
 |  |  |     /* 如果不明确 type类型,MP将自动为其赋值(雪花ID) | 
 |  |  |     IdType: | 
 |  |  |     AUTO(0),  //自增 | 
 |  |  |     NONE(1), //未设置主键 | 
 |  |  |     INPUT(2), //手动输入 | 
 |  |  |     ASSIGN_ID(3),  //默认全局唯一ID | 
 |  |  |     ASSIGN_UUID(4), //全局唯一的 uuid | 
 |  |  |     */ | 
 |  |  |     @JSONField(serializeUsing= ObjectWriterImplToString.class) | 
 |  |  |     @TableId(value = "id", type = IdType.INPUT) | 
 |  |  |     public Long id; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 文件原名称 | 
 |  |  |      */ | 
 |  |  |     public String orgName; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 扩展名 | 
 |  |  |      */ | 
 |  |  |     public String extName; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 上传文件后系统自动给文件赋的新名称 | 
 |  |  |      */ | 
 |  |  |     public String newName; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 文件hash值 | 
 |  |  |      */ | 
 |  |  |     public Integer hash; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 文件在服务端存储的相对路径 | 
 |  |  |      */ | 
 |  |  |     public String filePath; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 文件上载日期 | 
 |  |  |      */ | 
 |  |  |     @TableField(value = "dt", fill = FieldFill.INSERT) | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
 |  |  |     public Date dt; | 
 |  |  |  | 
 |  |  | } |