using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using xModels.Base; using xCommons.Extensions; using xAiModels.Constants; using System.ComponentModel.DataAnnotations; namespace xAiApi.AI.Models.Entities { /// /// Message Model of Ai ... /// public class XAiMessage : XBaseGuidIDEntity { /// /// User Identifier ... /// /// [Required] [StringLength(255)] public string OwnerId { get; set; } /// /// Message of Chat ... /// [Required] 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 ... /// [StringLength(255)] public Guid ConversationId { get; set; } /// /// Conversation ... /// public XAiConversation Conversation { get; set; } // #region Meta Data Property ... private string _metadata; /// /// Meta Data of Message ... /// [NotMapped] 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 } }