-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from jamebal/recycle
feat: 新增功能-回收站
- Loading branch information
Showing
14 changed files
with
426 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.jmal.clouddisk.model; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.experimental.Accessors; | ||
|
||
@Data | ||
@Accessors(chain = true) | ||
@Builder | ||
public class OperationTips { | ||
/** | ||
* 操作结果说明 | ||
*/ | ||
String msg; | ||
/** | ||
* 操作结果状态 | ||
*/ | ||
Boolean success; | ||
/** | ||
* 操作 | ||
*/ | ||
String operation; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package com.jmal.clouddisk.model; | ||
|
||
import com.jmal.clouddisk.service.impl.FileServiceImpl; | ||
import com.jmal.clouddisk.video.VideoInfoDO; | ||
import lombok.Data; | ||
import org.springframework.data.mongodb.core.index.CompoundIndex; | ||
import org.springframework.data.mongodb.core.index.CompoundIndexes; | ||
import org.springframework.data.mongodb.core.mapping.Document; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* Trash 文件模型 | ||
* | ||
* @author jmal | ||
*/ | ||
@Data | ||
@Document(collection = FileServiceImpl.TRASH_COLLECTION_NAME) | ||
@CompoundIndexes({ | ||
@CompoundIndex(name = "name_1", def = "{'name': 1}"), | ||
@CompoundIndex(name = "size_1", def = "{'size': 1}"), | ||
@CompoundIndex(name = "updateDate_1", def = "{'updateDate': 1}"), | ||
@CompoundIndex(name = "hidden_1", def = "{'hidden': 1}"), | ||
}) | ||
public class Trash extends FileBase { | ||
private String userId; | ||
private String path; | ||
/** | ||
* 图片的宽度 | ||
*/ | ||
private String w; | ||
/** | ||
* 图片的高度 | ||
*/ | ||
private String h; | ||
/** | ||
* 文件内容 | ||
*/ | ||
private byte[] content; | ||
/*** | ||
* 文件后缀名 | ||
*/ | ||
private String suffix; | ||
/** | ||
* 音乐 | ||
*/ | ||
private Music music; | ||
/** | ||
* 照片exif信息 | ||
*/ | ||
private ExifInfo exif; | ||
/** | ||
* 视频信息 | ||
*/ | ||
private VideoInfoDO video; | ||
/** | ||
* m3u8文件路径(相对路径) | ||
*/ | ||
private String m3u8; | ||
/** | ||
* vtt文件路径(相对路径) | ||
*/ | ||
private String vtt; | ||
/** | ||
* 是否隐藏显示 | ||
*/ | ||
private boolean hidden; | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
final FileBase other = (FileBase) obj; | ||
return Objects.equals(this.id, other.id); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int hash = 7; | ||
hash = 89 * hash + (this.id != null ? this.id.hashCode() : 0); | ||
return hash; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.