CrtDramaProjectStoryboard.java 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. package com.backendsys.modules.crt.entity;
  2. import com.backendsys.config.Mybatis.handler.timezone.LocalDateTimeAdapter;
  3. import com.backendsys.entity.validator.RangeArray;
  4. import com.backendsys.entity.validator.RangeStringArray;
  5. import com.baomidou.mybatisplus.annotation.IdType;
  6. import com.baomidou.mybatisplus.annotation.TableField;
  7. import com.baomidou.mybatisplus.annotation.TableId;
  8. import com.baomidou.mybatisplus.annotation.TableName;
  9. import com.google.gson.annotations.JsonAdapter;
  10. import jakarta.validation.constraints.Max;
  11. import jakarta.validation.constraints.NotNull;
  12. import jakarta.validation.constraints.Size;
  13. import lombok.Data;
  14. import org.hibernate.validator.constraints.Range;
  15. import java.time.LocalDateTime;
  16. @Data
  17. @TableName("crt_drama_project_storyboard")
  18. public class CrtDramaProjectStoryboard {
  19. public static interface Detail{}
  20. public static interface StoryboardDetail{}
  21. public static interface Create{}
  22. public static interface Update{}
  23. public static interface Delete{}
  24. @TableId(type = IdType.AUTO)
  25. private Long id;
  26. @TableField(exist = false)
  27. @NotNull(message = "分镜ID不能为空", groups = { Update.class })
  28. private Long drama_project_storyboard_id;
  29. private Long user_id;
  30. @NotNull(message = "项目ID不能为空", groups = { Create.class, StoryboardDetail.class })
  31. private Long drama_project_id;
  32. @NotNull(message = "集数不能为空", groups = { Create.class, StoryboardDetail.class })
  33. @Max(value = 999, message = "集数不超过 {value}")
  34. private Integer episode_num;
  35. @NotNull(message = "序号不能为空", groups = { Create.class })
  36. @Range(min = 1, max = 9999, message = "排序必须在 {min} 到 {max} 之间")
  37. private Integer sort;
  38. @Size(max = 1000, message = "分镜设计长度不超过 {max} 个字符", groups = { Update.class })
  39. private String story_prompt;
  40. @Size(max = 1000, message = "景别长度不超过 {max} 个字符", groups = { Update.class })
  41. private String story_framing;
  42. @Size(max = 1000, message = "场景长度不超过 {max} 个字符", groups = { Update.class })
  43. private String story_scene;
  44. @Size(max = 1000, message = "天气/时间长度不超过 {max} 个字符", groups = { Update.class })
  45. private String story_weather_time;
  46. // 人物LoRA ID (创建时,跟随项目的人物LoRAID)(多个人物ID以逗号分隔)
  47. @Size(max = 255, message = "人物LoRA ID长度不超过 {max} 个字符", groups = { Update.class })
  48. private String lora_figure_ids;
  49. // 每次生成图片数量 (默认值:1,整数范围:1~4)
  50. @RangeArray(message="生成图片数量取值有误,范围应是(1, 2, 3, 4)", value = { "1", "2", "3", "4" }, groups = { Update.class })
  51. private Integer param_image_count;
  52. // 提示词引导系数 (默认值:3.5,小数点后一位,范围:1~30)
  53. @Range(min = 1, max = 30, message = "提示词引导系数必须在 {min} 到 {max} 之间", groups = { Update.class })
  54. private Float param_prompt_weight;
  55. // 采样方法 (枚举: SamplingMethodEnums)(Euler: euler, DPM++2M: dpmpp_2m)
  56. @RangeStringArray(message="采样方法取值有误,范围应是(Euler, DPM++2M)", value = { "Euler", "DPM++2M" }, groups = { Update.class })
  57. private String param_sampling_method;
  58. // 步数 (默认值:20,整数范围:1~30)
  59. @Range(min = 1, max = 30, message = "步数必须在 {min} 到 {max} 之间", groups = { Update.class })
  60. private Integer param_step_count;
  61. // 随机种子 (默认值:1,范围:(1:随机, 2:自定义))
  62. @RangeArray(message="随机种子取值有误,范围应是(1, 2)", value = { "1", "2" }, groups = { Update.class })
  63. private Integer param_random_seed;
  64. // 随机种子自定义值 (长度: 0~64位整数)
  65. @Size(max = 64, message = "随机种子自定义值长度不超过 {max} 个字符", groups = { Update.class })
  66. private String param_random_seed_custom;
  67. // 文生图提示词 (生图时必填)
  68. @Size(max = 2000, message = "文生图提示词 长度不超过 {max} 个字符", groups = { Update.class })
  69. private String text_to_image_prompt;
  70. // 生视频模式 (1:首尾帧模式, 2:多图参考模式)
  71. @RangeArray(message="随机种子取值有误,范围应是(1, 2)", value = { "1", "2" }, groups = { Update.class })
  72. private Integer param_video_reference_type;
  73. // 参考图 (1~4张)(多图以逗号分隔)
  74. private String param_video_reference_images;
  75. // 图生视频提示词 (生视频时必填)
  76. private String image_to_video_prompt;
  77. // 生图状态 (-1:未生图, 1:生成中, 2:已生图)
  78. private Integer generate_image_status;
  79. // 生视频状态 (-1:未生视频, 1:生成中, 2:已生视频)
  80. private Integer generate_video_status;
  81. // private String create_time;
  82. // private String update_time;
  83. @JsonAdapter(LocalDateTimeAdapter.class)
  84. private LocalDateTime create_time;
  85. @JsonAdapter(LocalDateTimeAdapter.class)
  86. private LocalDateTime update_time;
  87. }