VolcengineVideoTask.java 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. package com.backendsys.modules.ai.volcengine.entity;
  2. import com.backendsys.config.Mybatis.handler.timezone.LocalDateTimeAdapter;
  3. import com.backendsys.entity.validator.RangeArray;
  4. import com.baomidou.mybatisplus.annotation.IdType;
  5. import com.baomidou.mybatisplus.annotation.TableField;
  6. import com.baomidou.mybatisplus.annotation.TableId;
  7. import com.baomidou.mybatisplus.annotation.TableName;
  8. import com.google.gson.annotations.JsonAdapter;
  9. import jakarta.validation.constraints.NotBlank;
  10. import jakarta.validation.constraints.NotNull;
  11. import jakarta.validation.constraints.Size;
  12. import lombok.Data;
  13. import java.time.LocalDateTime;
  14. import java.util.List;
  15. @TableName("ai_volcengine_video_task")
  16. @Data
  17. public class VolcengineVideoTask {
  18. public static interface Query{}
  19. public static interface Generate{}
  20. @TableId(type = IdType.AUTO)
  21. private Long id;
  22. /**
  23. * 用户ID
  24. */
  25. private Long user_id;
  26. /**
  27. * 模型
  28. */
  29. @NotBlank(message = "请选择模型", groups = { Generate.class })
  30. private String model;
  31. /**
  32. * 图片地址
  33. */
  34. @NotBlank(message = "请上传图片", groups = { Generate.class })
  35. private String img_url;
  36. /**
  37. * 分辨率 480p 720p 1080p
  38. */
  39. @NotBlank(message = "请选择分辨率", groups = { Generate.class })
  40. private String resolution;
  41. /**
  42. * 时长 秒
  43. */
  44. @NotNull(message = "请选择时长", groups = { Generate.class })
  45. @RangeArray(message="时长取值有误,范围应是(5, 10)", value = { "5", "10" })
  46. private Integer duration;
  47. /**
  48. * 文本说明
  49. */
  50. @Size(max = 500, message = "提示词长度不能超过 {max} 字符", groups = { Generate.class })
  51. private String text;
  52. /**
  53. * 是否固定镜头 1-是 -1-否
  54. */
  55. private Integer camerafixed;
  56. /**
  57. * 生成数量
  58. */
  59. @NotNull(message="生成数量不能为空")
  60. @RangeArray(message="生成数量取值有误,范围应是(1, 2, 3, 4)", value = { "1", "2", "3", "4" }, groups = { Generate.class })
  61. private Integer quantity;
  62. @JsonAdapter(LocalDateTimeAdapter.class)
  63. private LocalDateTime create_time;
  64. @JsonAdapter(LocalDateTimeAdapter.class)
  65. private LocalDateTime update_time;
  66. @TableField(exist = false)
  67. private List<VolcengineVideoTaskDetail> detail_list;
  68. /**
  69. * 是否收藏 1-是 -1-否
  70. */
  71. @TableField(exist = false)
  72. private Integer is_collect;
  73. }