add mapper configs ...

This commit is contained in:
2026-08-01 15:32:14 +03:30
parent 2696a9850c
commit 9a13fa68a7
6 changed files with 121 additions and 0 deletions
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using xAiModels.Models.Dtos;
using xAiModels.Models.Entities;
namespace xAiModels.Configurations.Entities
{
public class XAiConversationMappingAction : IMappingAction<XAiConversation, XAiConversationDto>
{
public void Process(
XAiConversation source,
XAiConversationDto destination,
ResolutionContext context
)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using xAiModels.Models.Dtos;
using xAiModels.Models.Entities;
namespace xAiModels.Configurations.Entities
{
public class XAiMessageMappingAction : IMappingAction<XAiMessage, XAiMessageDto>
{
public void Process(
XAiMessage source,
XAiMessageDto destination,
ResolutionContext context
)
{
//
// Retrieve Owner ...
// Retrieve Conversation ...
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using xAiModels.Models.Dtos;
using xAiModels.Models.Entities;
namespace xAiModels.Configurations.Entities
{
public class XAiProjectMappingAction : IMappingAction<XAiProject, XAiProjectDto>
{
public void Process(
XAiProject source,
XAiProjectDto destination,
ResolutionContext context
)
{
//
// Retrieve Owner ...
// Retrieve Title Resources ...
// Retrieve Description Resources ...
throw new NotImplementedException();
}
}
}
+10
View File
@@ -8,5 +8,15 @@ namespace xAiModels.Configurations
/// Model Providers ... /// Model Providers ...
/// </summary> /// </summary>
public XAiModelDescriptor[] Models { get; set; } = []; public XAiModelDescriptor[] Models { get; set; } = [];
/// <summary>
/// Each User must Has a Default Project ...
/// </summary>
public string DefaultProjectResource { get; set; }
/// <summary>
/// Each User must Has a Default Conversation ...
/// </summary>
public string DefaultConversationResource { get; set; }
} }
} }
+28
View File
@@ -0,0 +1,28 @@
using AutoMapper;
using xAiModels.Configurations.Entities;
using xAiModels.Models.Dtos;
using xAiModels.Models.Entities;
namespace xAiModels.Configurations
{
public class XAiModelMappersProfile : Profile
{
public XAiModelMappersProfile()
{
//
// XAiMessage ...
CreateMap<XAiMessage, XAiMessageDto>()
.AfterMap<XAiMessageMappingAction>();
//
// XAiProject ...
CreateMap<XAiProject, XAiProjectDto>()
.AfterMap<XAiProjectMappingAction>();
//
// XAiConversation ...
CreateMap<XAiConversation, XAiConversationDto>()
.AfterMap<XAiConversationMappingAction>();
}
}
}
+10
View File
@@ -0,0 +1,10 @@
namespace xAiModels.Interfaces
{
/// <summary>
/// All Data Manipulation Requirements ...
/// </summary>
public interface IXAiDataProvider
{
}
}