package com.backendsys.entity.Ai;

import com.backendsys.entity.validator.RangeStringArray;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class AiGenerateVideoDTO {
    public static interface Detail{}
    public static interface Create{}
    public static interface Update{}
    public static interface Delete{}

    private Long id;

    private Long user_id;

    @NotNull(message = "任务ID不能为空", groups = { Update.class, Delete.class, Detail.class })
    private Long job_id;

    @NotNull(message = "标题不能为空", groups = { Create.class })
    @Size(max = 50, message = "标题长度不超过 {max} 字符", groups = { Create.class })
    private String title;

    @NotNull(message = "内容不能为空", groups = { Create.class })
    private String source;

    @NotNull(message = "分辨率不能为空", groups = { Create.class })
    private Integer[] resolution;
    private String resolutionString;


    @NotNull(message = "视频输出类型不能为空", groups = { Create.class })
    @RangeStringArray(message="视频输出类型有误，范围应是(video：mp4视频, timeline：json时间轴信息)", value = {"video", "timeline"})
    private String product_type;

    private Integer tts_per;
    private String bg_music_url;
    private String video_begin_url;
    private String video_end_url;

    private String caption_margin_bottom;
    private String caption_font_color;
    private String caption_font_alpha;
    private String caption_bg_color;
    private String caption_bg_alpha;

    private String video_logo_url;
    private String video_logo_location;
    private Integer video_logo_margin;

    @RangeStringArray(message="任务状态取值有误，范围应是 (0任务排队中，1任务完成，3任务执行中)", value = {"0", "1", "3"}, groups = { Create.class, Update.class })
    private String job_status;

    private String result_video_url;
    private String result_points;
    private String result_basic_duration;
    private String result_fail_reason;

    private String create_time;
    private String update_time;

}
