package com.pablotj.ai.chat.presentation.dto;

import com.pablotj.ai.chat.domain.model.ConversationSummary;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;

/**
 * Request DTO for creating a new conversation.
 */
@Schema(description = "Request to create a new conversation")
public record CreateConversationRequest(

        @Schema(description = "Optional conversation title", example = "Discussion about AI")
        @Size(max = 100, message = "Title cannot exceed 100 characters")
        String title,

        @Schema(description = "Optional conversation description", example = "A detailed conversation about artificial intelligence")
        @Size(max = 500, message = "Description cannot exceed 500 characters")
        String description
) {

    public ConversationSummary toConversationSummary() {
        return ConversationSummary.of(title, description);
    }
}
