|
|
@@ -7,6 +7,9 @@ import lombok.Getter;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
import lombok.Setter;
|
|
|
|
|
|
+import javax.validation.constraints.NotBlank;
|
|
|
+import javax.validation.constraints.NotNull;
|
|
|
+
|
|
|
/**
|
|
|
* @author reghao
|
|
|
* @date 2024-02-23 15:05:30
|
|
|
@@ -15,40 +18,50 @@ import lombok.Setter;
|
|
|
@Getter
|
|
|
@Setter
|
|
|
public class UploadChannel extends BaseObject<Integer> {
|
|
|
+ @NotNull
|
|
|
+ private Integer userNodeId;
|
|
|
+ @NotNull
|
|
|
private Integer channelCode;
|
|
|
+ @NotBlank
|
|
|
private String name;
|
|
|
+ @NotBlank
|
|
|
private String prefix;
|
|
|
+ @NotNull
|
|
|
private Long maxSize;
|
|
|
+ @NotNull
|
|
|
private Integer fileType;
|
|
|
- private Boolean seturl;
|
|
|
+ @NotNull
|
|
|
private Integer scope;
|
|
|
+ @NotNull
|
|
|
+ private Boolean seturl;
|
|
|
+ @NotNull
|
|
|
private Boolean enabled;
|
|
|
- private Integer userNodeId;
|
|
|
+ @NotNull
|
|
|
private Integer createBy;
|
|
|
|
|
|
- public UploadChannel(int channelCode, UploadChannelDto uploadChannelDto, int createBy) {
|
|
|
+ public UploadChannel(int channelCode, UploadChannelDto uploadChannelDto, int ossUser) {
|
|
|
+ this.userNodeId = uploadChannelDto.getUserNodeId();
|
|
|
this.channelCode = channelCode;
|
|
|
this.name = uploadChannelDto.getChannelName();
|
|
|
this.prefix = uploadChannelDto.getChannelPrefix();
|
|
|
this.maxSize = uploadChannelDto.getMaxSize();
|
|
|
this.fileType = uploadChannelDto.getObjectType();
|
|
|
this.scope = uploadChannelDto.getScope();
|
|
|
- this.userNodeId = uploadChannelDto.getUserNodeId();
|
|
|
- this.createBy = createBy;
|
|
|
this.seturl = false;
|
|
|
this.enabled = true;
|
|
|
+ this.createBy = ossUser;
|
|
|
}
|
|
|
|
|
|
public UploadChannel(int userNodeId, UploadChannelType uploadChannelType, int ossUser) {
|
|
|
+ this.userNodeId = userNodeId;
|
|
|
this.channelCode = uploadChannelType.getChannelCode();
|
|
|
this.name = uploadChannelType.name();
|
|
|
this.prefix = uploadChannelType.getChannelPrefix();
|
|
|
this.maxSize = uploadChannelType.getMaxSize();
|
|
|
this.fileType = uploadChannelType.getFileType();
|
|
|
this.scope = uploadChannelType.getScope();
|
|
|
- this.userNodeId = userNodeId;
|
|
|
- this.createBy = ossUser;
|
|
|
this.seturl = false;
|
|
|
this.enabled = true;
|
|
|
+ this.createBy = ossUser;
|
|
|
}
|
|
|
}
|