123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- package com.backendsys.modules.upload.entity;
- import com.baomidou.mybatisplus.annotation.*;
- import jakarta.validation.constraints.NotEmpty;
- import jakarta.validation.constraints.NotNull;
- import jakarta.validation.constraints.Size;
- import lombok.Data;
- import java.util.List;
- @Data
- @TableName("sys_file")
- public class SysFile {
- public static interface Update{}
- public static interface UpdateBatch{}
- public static interface Delete{}
- public static interface DeleteBatch{}
- @TableId(type = IdType.AUTO)
- @NotNull(message = "id 不能为空", groups = { Update.class })
- private Long id;
- @TableField(exist = false)
- @NotNull(message = "ids 不能为空", groups = { UpdateBatch.class })
- @Size(min = 1, message = "ids 的数量必须大于 0", groups = { UpdateBatch.class })
- private List<Long> ids;
- @TableField(updateStrategy = FieldStrategy.NOT_NULL)
- private Long category_id;
- @TableField(exist = false)
- private String category_name;
- private String request_id;
- private String upload_id;
- private Integer upload_chunk_count;
- private Integer upload_chunk_index;
- private Long user_id;
- @TableField(exist = false)
- private String username;
- @NotEmpty(message = "文件名不能为空", groups = { Update.class })
- @Size(max = 50, message = "文件名长度不超过 {max} 字符", groups = { Update.class })
- private String name;
- private String content_type;
- private String url;
- private String url_thumb;
- @NotEmpty(message = "object_key 不能为空", groups = { Delete.class })
- private String object_key;
- @TableField(exist = false)
- @NotNull(message = "object_keys 不能为空", groups = { DeleteBatch.class })
- @Size(min = 1, message = "object_keys 的数量必须大于 0", groups = { DeleteBatch.class })
- private List<String> object_keys;
- private Long size;
- private String md5;
- private Integer target; // 上传目标 (-1:本地, 1:腾讯云, 2:阿里云, 3.抖音云)
- @TableField(exist = false)
- private String target_label;
- private String upload_time;
- private String create_time;
- private String update_time;
- }
|