AiGenerateVideoDTO.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package com.backendsys.entity.Ai;
  2. import com.backendsys.entity.validator.RangeStringArray;
  3. import jakarta.validation.constraints.NotNull;
  4. import jakarta.validation.constraints.Size;
  5. import lombok.Data;
  6. import lombok.ToString;
  7. @Data
  8. @ToString
  9. public class AiGenerateVideoDTO {
  10. public static interface Detail{}
  11. public static interface Create{}
  12. public static interface Update{}
  13. public static interface Delete{}
  14. private Long id;
  15. private Long user_id;
  16. @NotNull(message = "任务ID不能为空", groups = { Update.class, Delete.class, Detail.class })
  17. private Long job_id;
  18. @NotNull(message = "标题不能为空", groups = { Create.class })
  19. @Size(max = 50, message = "标题长度不超过 {max} 字符", groups = { Create.class })
  20. private String title;
  21. @NotNull(message = "内容不能为空", groups = { Create.class })
  22. private String source;
  23. @NotNull(message = "分辨率不能为空", groups = { Create.class })
  24. private Integer[] resolution;
  25. private String resolutionString;
  26. @NotNull(message = "视频输出类型不能为空", groups = { Create.class })
  27. @RangeStringArray(message="视频输出类型有误,范围应是(video:mp4视频, timeline:json时间轴信息)", value = {"video", "timeline"})
  28. private String product_type;
  29. private Integer tts_per;
  30. private String bg_music_url;
  31. private String video_begin_url;
  32. private String video_end_url;
  33. private String caption_margin_bottom;
  34. private String caption_font_color;
  35. private String caption_font_alpha;
  36. private String caption_bg_color;
  37. private String caption_bg_alpha;
  38. private String video_logo_url;
  39. private String video_logo_location;
  40. private Integer video_logo_margin;
  41. @RangeStringArray(message="任务状态取值有误,范围应是 (0任务排队中,1任务完成,3任务执行中)", value = {"0", "1", "3"}, groups = { Create.class, Update.class })
  42. private String job_status;
  43. private String result_video_url;
  44. private String result_points;
  45. private String result_basic_duration;
  46. private String result_fail_reason;
  47. private String create_time;
  48. private String update_time;
  49. }