This commit is contained in:
2026-07-26 21:19:40 +03:30
parent 429c07a02d
commit 2144e9f8a7
82 changed files with 2712 additions and 146 deletions
+43
View File
@@ -0,0 +1,43 @@
using System;
using System.ComponentModel.DataAnnotations;
using xModels.Base;
namespace xAiModels.Models.Entities
{
/// <summary>
/// Conversation Describe ...
/// </summary>
public class XAiConversation : XBaseGuidIDEntity
{
/// <summary>
/// User Identifier ...
/// </summary>
/// <value></value>
[Required]
[StringLength(255)]
public string OwnerId { get; set; }
/// <summary>
/// Title of Conversation ...
/// </summary>
[Required]
[StringLength(255)]
public string Title { get; set; }
/// <summary>
/// Created Time ...
/// </summary>
public DateTime CreatedOn { get; set; }
/// <summary>
/// Updated Time ...
/// </summary>
public DateTime UpdatedAt { get; set; }
/// <summary>
/// Project ID ...
/// </summary>
[Required]
public Guid ProjectId { get; set; }
}
}
+85
View File
@@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using xAiModels.Constants;
using xCommons.Extensions;
using xModels.Base;
namespace xAiModels.Models.Entities
{
/// <summary>
/// Message Model of Ai ...
/// </summary>
public class XAiMessage : XBaseGuidIDEntity
{
/// <summary>
/// User Identifier ...
/// </summary>
/// <value></value>
[Required]
[StringLength(255)]
public string OwnerId { get; set; }
/// <summary>
/// Message of Chat ...
/// </summary>
[Required]
public string Content { get; set; }
/// <summary>
/// Role of Message ...
/// </summary>
public XAiChatRole Role { get; set; }
/// <summary>
/// Created Time ...
/// </summary>
public DateTime CreatedOn { get; set; }
/// <summary>
/// Updated Time ...
/// </summary>
public DateTime UpdatedAt { get; set; }
/// <summary>
/// Conversation Id ...
/// </summary>
[StringLength(255)]
public Guid ConversationId { get; set; }
//
#region Meta Data Property ...
private string _metadata;
/// <summary>
/// Meta Data of Message ...
/// </summary>
[NotMapped]
public IDictionary<string, object> Metadata { get; private set; } = null;
/// <summary>
/// Meta Data of MEssage in Json ...
/// </summary>
public string MeatDatas
{
//
get => _metadata;
//
set
{
//
// Converts Json String to Dictionary ...
if (!value.IsNullOrEmpty())
{
Metadata = value.FromJSON<IDictionary<string, object>>();
}
//
_metadata = value;
}
}
#endregion
}
}
+48
View File
@@ -0,0 +1,48 @@
using System;
using System.ComponentModel.DataAnnotations;
using xModels.Base;
namespace xAiModels.Models.Entities
{
/// <summary>
/// Describe a Project ...
/// </summary>
public class XAiProject : XBaseGuidIDEntity
{
/// <summary>
/// User Identifier ...
/// </summary>
/// <value></value>
[Required]
[StringLength(255)]
public string OwnerId { get; set; }
/// <summary>
/// Title of Project ...
/// </summary>
[Required]
[StringLength(255)]
public string Title { get; set; }
/// <summary>
/// Description of Project ...
/// </summary>
[StringLength(1000)]
public string Description { get; set; }
/// <summary>
/// a Prompt for Project Start ...
/// </summary>
public string Prompt { get; set; }
/// <summary>
/// Created Time ...
/// </summary>
public DateTime CreatedOn { get; set; }
/// <summary>
/// Updated Time ...
/// </summary>
public DateTime UpdatedAt { get; set; }
}
}