package com.yaoai.api.dto.ai;

import com.yaoai.domain.entity.Outline;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class OutlineDTO {

    private Long id;
    private Long projectId;
    private String title;
    private String genre;
    private Integer episodeCount;
    private String synopsis;
    private String status;
    private LocalDateTime createdAt;

    public static OutlineDTO from(Outline o) {
        OutlineDTO dto = new OutlineDTO();
        dto.setId(o.getId());
        dto.setProjectId(o.getProjectId());
        dto.setTitle(o.getTitle());
        dto.setGenre(o.getGenre());
        dto.setEpisodeCount(o.getEpisodeCount());
        dto.setSynopsis(o.getSynopsis());
        dto.setStatus(o.getStatus());
        dto.setCreatedAt(o.getCreatedAt());
        return dto;
    }
}
