|
|
@@ -12,6 +12,9 @@ import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
+import javax.validation.constraints.NotBlank;
|
|
|
+import javax.validation.constraints.NotNull;
|
|
|
+import javax.validation.constraints.Size;
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
/**
|
|
|
@@ -24,17 +27,31 @@ import java.time.LocalDateTime;
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
|
@Data
|
|
|
public class VideoPost extends BaseObject<Integer> {
|
|
|
+ @NotBlank
|
|
|
private String videoId;
|
|
|
+ @NotBlank
|
|
|
+ @Size(min = 1, max = 64, message = "视频名字不能超过 64 个字符")
|
|
|
private String title;
|
|
|
+ @NotNull
|
|
|
+ @Size(max = 10_000, message = "视频描述不能超过 10_000 个字符")
|
|
|
private String description;
|
|
|
+ @NotNull
|
|
|
private Integer categoryPid;
|
|
|
+ @NotNull
|
|
|
private Integer categoryId;
|
|
|
- private int duration;
|
|
|
+ @NotNull
|
|
|
+ private Integer duration;
|
|
|
+ @NotNull
|
|
|
private Boolean horizontal;
|
|
|
+ @NotBlank
|
|
|
private String coverUrl;
|
|
|
- private int scope;
|
|
|
- private int status;
|
|
|
+ @NotNull
|
|
|
+ private Integer scope;
|
|
|
+ @NotNull
|
|
|
+ private Integer status;
|
|
|
+ @NotNull
|
|
|
private LocalDateTime publishAt;
|
|
|
+ @NotNull
|
|
|
private Long publishBy;
|
|
|
|
|
|
public VideoPost(String videoId, VideoPublishSbt video, String coverUrl,
|