using System;
using System.Collections.Generic;
using xAiModels.Constants;
using xCommons.Extensions;
using xModels.Base;
using xModels.Dtos;
namespace xAiModels.Models.Dtos
{
public class XAiMessageDto : XBaseGuidIDEntityDto
{
///
/// User Identifier ...
///
///
public string OwnerId { get; set; }
///
/// Owner Info ...
///
public virtual XPersonDto Owner { get; set; } = null;
///
/// Message of Chat ...
///
public string Content { get; set; }
///
/// Role of Message ...
///
public XAiChatRole Role { get; set; }
///
/// Created Time ...
///
public DateTime CreatedOn { get; set; }
///
/// Updated Time ...
///
public DateTime UpdatedAt { get; set; }
///
/// Conversation Id ...
///
public Guid ConversationId { get; set; }
///
/// Conversation Info ...
///
public virtual XAiConversationDto Conversation { get; set; } = null;
//
#region Meta Data Property ...
private string _metadata;
///
/// Meta Data of Message ...
///
public IDictionary Metadata { get; private set; } = null;
///
/// Meta Data of MEssage in Json ...
///
public string MeatDatas
{
//
get => _metadata;
//
set
{
//
// Converts Json String to Dictionary ...
if (!value.IsNullOrEmpty())
{
Metadata = value.FromJSON>();
}
//
_metadata = value;
}
}
#endregion
}
}