package com.yaoai.api.dto.ai;

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

import java.time.LocalDateTime;

@Data
public class ShotAssetDTO {

    private Long id;
    private Long storyboardId;
    private Long projectId;
    private Long episodeId;
    private String assetType;
    private String tosKey;
    private String externalUrl;
    private Long sourceTaskId;
    private String prompt;
    private String modelProvider;
    private String modelId;
    private Integer assetVersion;
    private String characters;
    private String metaJson;
    private String errorMessage;
    private String status;
    private Integer isActive;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;

    public static ShotAssetDTO from(ShotAsset asset) {
        ShotAssetDTO dto = new ShotAssetDTO();
        dto.setId(asset.getId());
        dto.setStoryboardId(asset.getStoryboardId());
        dto.setProjectId(asset.getProjectId());
        dto.setEpisodeId(asset.getEpisodeId());
        dto.setAssetType(asset.getAssetType());
        dto.setTosKey(asset.getTosKey());
        dto.setExternalUrl(asset.getExternalUrl());
        dto.setSourceTaskId(asset.getSourceTaskId());
        dto.setPrompt(asset.getPrompt());
        dto.setModelProvider(asset.getModelProvider());
        dto.setModelId(asset.getModelId());
        dto.setAssetVersion(asset.getAssetVersion());
        dto.setCharacters(asset.getCharacters());
        dto.setMetaJson(asset.getMetaJson());
        dto.setErrorMessage(asset.getErrorMessage());
        dto.setStatus(asset.getStatus());
        dto.setIsActive(asset.getIsActive());
        dto.setCreatedAt(asset.getCreatedAt());
        dto.setUpdatedAt(asset.getUpdatedAt());
        return dto;
    }
}
