package com.backendsys.modules.crt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.util.List;

@Data
@TableName("crt_drama_project")
public class CrtDramaProject {

    public static interface Detail{}
    public static interface Create{}
    public static interface InitStoryboard{}
    public static interface Update{}
    public static interface Delete{}

    @TableId(type = IdType.AUTO)

    private Long id;

    @TableField(exist = false)
    @NotNull(message = "项目ID不能为空", groups = { InitStoryboard.class, Update.class, Delete.class })
    private Long drama_project_id;

    private Long user_id;
    @NotEmpty(message = "项目名称不能为空", groups = { Create.class, Update.class })
    @Size(max = 50, message = "项目名称长度不能超过50个字符", groups = { Create.class, Update.class })
    private String project_name;

    @TableField(exist = false)
    @NotNull(message = "集数不能为空", groups = { InitStoryboard.class })
    @Max(value = 999, message = "集数长度不超过 {value}", groups = { InitStoryboard.class })
    private Integer episode_num;

    @TableField(exist = false)
    private List<Integer> storyboard_episode_nums;  // 集数 (子查询)

    private Long drama_lora_style_id;
    private String drama_lora_character_ids;
    private Long create_user_id;
    private String create_time;
    private String update_time;

}
