package com.backendsys.modules.upload.entity;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.List;

@Data
public class SysFileMergeByMd5 {

    public static interface MergeByMd5{}

    private Long user_id;
    @NotEmpty(message = "md5 不能为空", groups = { MergeByMd5.class })
    private String md5;
    @NotNull(message = "object_keys 不能为空", groups = { MergeByMd5.class })
    @Size(min = 1, message = "object_keys 的数量必须大于 0", groups = { MergeByMd5.class })
    private List<String> object_keys;
    @NotEmpty(message = "合并后的文件名不能为空", groups = { MergeByMd5.class })
    @Size(max = 50, message = "文件名长度不超过 {max} 字符", groups = { MergeByMd5.class })
    private String target_file_name;
    @NotEmpty(message = "合并后的文件 object_key 不能为空", groups = { MergeByMd5.class })
    private String target_object_key;

}
