using System.ComponentModel.DataAnnotations;

namespace Journal.Core.Dtos;

public sealed record ConversationDto(
    Guid Id,
    string Title,
    DateTimeOffset CreatedAt,
    DateTimeOffset UpdatedAt);

public sealed record ConversationDetailDto(
    Guid Id,
    string Title,
    IReadOnlyList<ConversationMessageDto> Messages,
    DateTimeOffset CreatedAt,
    DateTimeOffset UpdatedAt);

public sealed record ConversationMessageDto(
    Guid Id,
    string Role,
    string Text,
    DateTimeOffset CreatedAt);

public sealed record CreateConversationDto(
    [Required] string Title);

public sealed record UpdateConversationDto(
    string? Title);
