diff --git a/src/main/java/com/matrixcube/filefusionspringboot/entity/File.java b/src/main/java/com/matrixcube/filefusionspringboot/entity/File.java index 337b059..4ac6466 100644 --- a/src/main/java/com/matrixcube/filefusionspringboot/entity/File.java +++ b/src/main/java/com/matrixcube/filefusionspringboot/entity/File.java @@ -1,5 +1,163 @@ package com.matrixcube.filefusionspringboot.entity; -public class File { +import java.util.Date; +public class File { + private Long id; // 文件唯一标识 + private String fileName; // 文件名称 + private String fileType; // 文件类型(例如:txt, pdf, jpg 等) + private Long fileSize; // 文件大小(单位:字节) + private String filePath; // 存储路径 + private String fileUrl; // 可访问的 URL 路径 + private String fileHash; // 文件的唯一标识(例如 MD5、SHA256 校验值) + private String uploadedBy; // 上传用户 ID 或名称 + private Date uploadDate; // 文件上传时间 + private Date lastModifiedDate; // 文件最后修改时间 + private String description; // 文件描述 + private String status; // 文件状态(例如:上传中、上传完成、失败等) + private Long parentId; // 如果是文件夹类型,指向父文件夹 + private Boolean isDirectory; // 是否为文件夹 + private String storageType; // 存储类型(例如:本地存储、云存储等) + + // Getters 和 Setters 方法 + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getFileType() { + return fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } + + public Long getFileSize() { + return fileSize; + } + + public void setFileSize(Long fileSize) { + this.fileSize = fileSize; + } + + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public String getFileUrl() { + return fileUrl; + } + + public void setFileUrl(String fileUrl) { + this.fileUrl = fileUrl; + } + + public String getFileHash() { + return fileHash; + } + + public void setFileHash(String fileHash) { + this.fileHash = fileHash; + } + + public String getUploadedBy() { + return uploadedBy; + } + + public void setUploadedBy(String uploadedBy) { + this.uploadedBy = uploadedBy; + } + + public Date getUploadDate() { + return uploadDate; + } + + public void setUploadDate(Date uploadDate) { + this.uploadDate = uploadDate; + } + + public Date getLastModifiedDate() { + return lastModifiedDate; + } + + public void setLastModifiedDate(Date lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public Boolean getIsDirectory() { + return isDirectory; + } + + public void setIsDirectory(Boolean isDirectory) { + this.isDirectory = isDirectory; + } + + public String getStorageType() { + return storageType; + } + + public void setStorageType(String storageType) { + this.storageType = storageType; + } + + @Override + public String toString() { + return "File{" + + "id=" + id + + ", fileName='" + fileName + '\'' + + ", fileType='" + fileType + '\'' + + ", fileSize=" + fileSize + + ", filePath='" + filePath + '\'' + + ", fileUrl='" + fileUrl + '\'' + + ", fileHash='" + fileHash + '\'' + + ", uploadedBy='" + uploadedBy + '\'' + + ", uploadDate=" + uploadDate + + ", lastModifiedDate=" + lastModifiedDate + + ", description='" + description + '\'' + + ", status='" + status + '\'' + + ", parentId=" + parentId + + ", isDirectory=" + isDirectory + + ", storageType='" + storageType + '\'' + + '}'; + } }