package com.backendsys.modules.crt.entity;

import com.backendsys.entity.validator.RangeArray;
import com.backendsys.entity.validator.RangeStringArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import javax.validation.constraints.Min;
import java.math.BigDecimal;

@Data
@TableName("crt_drama_project_settings")
public class CrtDramaProjectSettings {

    public static interface UpdateSettings{}

    @TableId(type = IdType.AUTO)
    private Long id;

    @NotNull(message = "项目ID不能空", groups = { UpdateSettings.class })
    private Long drama_project_id;
    @NotNull(message = "项目配置类型不能空", groups = { UpdateSettings.class })
    @RangeArray(message="项目配置类型取值有误，范围应是(1:生图配置, 2:生视频配置)", value = {"1", "2"}, groups = { UpdateSettings.class })
    private Integer drama_project_setting_type;

    @NotNull(message = "画面比例不能空", groups = { UpdateSettings.class })
    @RangeStringArray(message="画面比例取值有误，范围应是(16:9, 9:16, 1:1)", value = {"16:9", "9:16", "1:1"}, groups = { UpdateSettings.class })
    private String aspect_ratio;

    private Long model_id;
    private Long lora_style_id;             // 风格LoRA ID
    @Min(value = 0, message = "风格强度取值范围应在 0-2 之间 (保留小数点后一位)", groups = { UpdateSettings.class })
    @Max(value = 2, message = "风格强度取值范围应在 0-2 之间 (保留小数点后一位)", groups = { UpdateSettings.class })
    private Float lora_style_strength;      // 风格强度

}
