package com.yaoai.api.dto.script;

import lombok.Data;

import java.util.List;

/**
 * 解析 docx 剧本文档得到的结构化数据。
 * 用于"一键导入"流程，避免对已有结构化内容重复调用 AI。
 */
@Data
public class ParsedScript {

    private String title;
    private String genre;
    private String synopsis;
    private int episodeCount;

    private List<Character> characters;
    private List<Scene> scenes;
    private List<EpisodeOutline> episodeOutlines;
    private List<EpisodeScript> episodeScripts;

    // ---- 内部数据类 ----

    @Data
    public static class Character {
        private String name;
        private String description;
        /** female_lead / male_lead / antagonist / supporting */
        private String roleType;
        /** male / female */
        private String gender;
    }

    @Data
    public static class Scene {
        private String name;
        /** indoor / outdoor */
        private String sceneType;
        private String description;
    }

    @Data
    public static class EpisodeOutline {
        private int episodeNumber;
        private String content;
    }

    @Data
    public static class EpisodeScript {
        private int episodeNumber;
        private String location;
        /** 逗号分隔的角色名列表 */
        private String characterNames;
        private List<SceneSection> sceneSections;
    }

    @Data
    public static class SceneSection {
        /** 如 "1-1" */
        private String sectionId;
        /** 该场景的角色名（逗号分隔） */
        private String characterNames;
        private List<Shot> shots;
    }

    @Data
    public static class Shot {
        private int shotNumber;
        private String description;
    }
}
