buhuazhen
8 天以前 d1c296f59ea0ac750763ccaaa6c2132ce9166085
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
package com.ruoyi.basic.entity.dto;
 
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
 
import java.util.Date;
 
/**
 * @author buhuazhen
 * @date 2025/8/26
 * @email 3038525872@qq.com
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SimpleStorageDto {
    private Long id;
 
    private String originalFilename;
 
    private String contentType;
 
    /**
     * 用于下载
     */
    private String url;
 
    /**
     * 预览
     */
    private String previewUrl;
 
    private Date createTime;
 
    // 配合前端添加有一些字段
    private Long uid;
 
    private String name;
 
    private String status = "success";
    public SimpleStorageDto(Long id, String contentType, String originalFilename, Date createTime) {
        this.id = id;
        this.contentType = contentType;
        this.originalFilename = originalFilename;
        this.createTime = createTime;
    }
 
    public Long getUid() {
        return getId();
    }
 
    public String getName() {
        return getOriginalFilename();
    }
}