zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
package org.jeecg.modules.doc.entity;
 
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
 
import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.ToString;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.doc.constant.Constant;
import org.jeecg.modules.doc.vo.QiwenFile;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
 
/**
 * @Description: doc_file_path
 * @Author: jeecg-boot
 * @Date:   2022-07-04
 * @Version: V1.0
 */
@Data
@ToString
@TableName("doc_file_path")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="doc_file_path对象", description="doc_file_path")
public class DocFilePath implements Serializable {
    private static final long serialVersionUID = 1L;
 
    /**pathId*/
    @TableId
    @Excel(name = "pathId", width = 15)
    @ApiModelProperty(value = "pathId")
    private String pathId;
    /**删除批次号*/
    @Excel(name = "删除批次号", width = 15)
    @ApiModelProperty(value = "删除批次号")
    private String deleteBatchNum;
    /**删除标识(0-未删除,1-已删除)*/
    @Excel(name = "删除标识(0-未删除,1-已删除)", width = 15)
    @ApiModelProperty(value = "删除标识(0-未删除,1-已删除)")
    private Integer deleteFlag;
    /**删除时间*/
    @Excel(name = "删除时间", width = 15)
    @ApiModelProperty(value = "删除时间")
    private String deleteTime;
    /**扩展名*/
    @Excel(name = "扩展名", width = 15)
    @ApiModelProperty(value = "扩展名")
    private String extendName;
    /**文件id*/
    @Excel(name = "文件id", width = 15)
    @ApiModelProperty(value = "文件id")
    private String fileId;
    /**文件名*/
    @Excel(name = "文件名", width = 15)
    @ApiModelProperty(value = "文件名")
    private String fileName;
    /**文件路径*/
    @Excel(name = "文件路径", width = 15)
    @ApiModelProperty(value = "文件路径")
    private String filePath;
    /**是否是目录(0-否,1-是)*/
    @Excel(name = "是否是目录(0-否,1-是)", width = 15)
    @ApiModelProperty(value = "是否是目录(0-否,1-是)")
    private Integer isDir;
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**创建时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**更新时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
 
    /**文件状态(0-未发布,1-已发布)*/
    @Excel(name = "发布标识(0-未发布,1-已发布)", width = 15)
    @ApiModelProperty(value = "发布标识(0-未发布,1-已发布)")
    private Integer pathStatus;
 
    /**父级id*/
    private String parentId;
 
    @TableField(exist = false)
    private Long fileSize;
 
    @TableField(exist = false)
    private boolean permission;
 
    public DocFilePath(){
 
    };
 
    public DocFilePath(String pathId) {
      this.pathId = pathId;
    };
 
    public DocFilePath(QiwenFile qiwenFile, String fileId) {
        this.pathId = IdUtil.getSnowflakeNextIdStr();
        this.fileId = fileId;
        this.filePath = qiwenFile.getParent();
        this.fileName = qiwenFile.getNameNotExtend();
        this.extendName = qiwenFile.getExtendName();
        this.isDir = qiwenFile.isDirectory() ? Constant.IS_DIR : Constant.IS_NOT_DIR;
        this.updateTime = DateUtils.getDate();
        this.deleteFlag = Constant.DEL_FALSE;
    }
 
    public DocFilePath(QiwenFile qiwenFile, String updateBy, String fileId) {
        this.pathId = IdUtil.getSnowflakeNextIdStr();
        this.updateBy = updateBy;
        this.fileId = fileId;
        this.filePath = qiwenFile.getParent();
        this.fileName = qiwenFile.getNameNotExtend();
        this.extendName = qiwenFile.getExtendName();
        this.isDir = qiwenFile.isDirectory() ? Constant.IS_DIR : Constant.IS_NOT_DIR;
        this.updateTime = DateUtils.getDate();
        this.deleteFlag = Constant.DEL_FALSE;
    }
 
 
    @JsonIgnore
    public boolean isDirectory() {
        return this.isDir == Constant.IS_DIR;
    }
 
    @JsonIgnore
    public boolean isFile() {
        return this.isDir == Constant.IS_NOT_DIR;
    }
}