Initialize Commit ...

This commit is contained in:
2026-11-11 13:36:09 +03:30
commit 609402b04c
17 changed files with 276 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
#
# DotNet ...
bin
obj
#
# Natural Docs ...
Documentation/*
@@ -0,0 +1,16 @@
using xBotService.Constants;
using xDataService.Providers;
using xBotService.Models.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace xBotService.Configuration.Entities
{
public class XBotUserEntityConfiguration: XBaseEntityTypeConfiguration<XBotUser, int>
{
public override void Configure(EntityTypeBuilder<XBotUser> builder)
{
builder.ToTable(XBotServiceConstants.XBotUsersTable);
}
}
}
+7
View File
@@ -0,0 +1,7 @@
namespace xBotService.Constants
{
public partial struct ConfigurationNodeNames
{
public const string BOT_SERVICE_NODE = "BotServiceConfiguration";
}
}
+27
View File
@@ -0,0 +1,27 @@
namespace xBotService.Constants
{
public struct XBotServiceConstants
{
//
// Bot Service Log Tag ...
public const string XBotServiceDILogTag = "XBotService";
//
// Table Mapping ...
public const string XBotUserTable = "BotUsers";
//
// GraphQL Mappings ...
public const string XBotUserSingleName = "botUser";
public const string XBotUserCollectionName = "botUsers";
//
// Hubs ...
public const string XBotUserDtoHub = "botUserDto";
public const string XBotUserEntityHub = "botUserEntity";
//
// Helper Method Names ...
public const string GetXBotUserEFRepositoryDescriptor = "GetXBotUserEFRepositoryDescriptor";
}
}
@@ -0,0 +1,9 @@
using xBotService.Models.Dtos;
using xDataService.Interfaces;
using xBotService.Models.Entities;
namespace xBotService.Interfaces.Entities.Dtos
{
public interface IXBotUserRepositoryService : IXBaseRepositoryService<XBotUser, XBotUserDto, int>
{ }
}
@@ -0,0 +1,8 @@
using xDataService.Interfaces;
using xBotService.Models.Entities;
namespace xBotService.Interfaces.Entities
{
public interface IXBotUserKeyGenerator : IXKeyGenerator<XBotUser, int>
{ }
}
@@ -0,0 +1,8 @@
using xDataService.Interfaces;
using xBotService.Models.Entities;
namespace xBotService.Interfaces.Entities
{
public interface IXBotUserRepository : IXBaseRepository<XBotUser, int>
{ }
}
@@ -0,0 +1,8 @@
using xDataService.Interfaces;
using xBotService.Models.Entities;
namespace xBotService.Interfaces.Entities
{
public interface IXBotUserRepositoryEvents : IXBaseRepositoryEvents<XBotUser>
{ }
}
+29
View File
@@ -0,0 +1,29 @@
using xModels.Base;
using xModels.Dtos;
namespace xBotService.Models.Dtos
{
/// <summary>
/// Bot User / System User Relation ...
/// </summary>
public class XBotUserDto : XBaseIntIDEntityDto
{
/// <summary>
/// User Id ...
/// </summary>
/// <value></value>
public string UserId { get; set; }
/// <summary>
/// System Person Information ...
/// </summary>
/// <value></value>
public virtual XPersonDto User { get; set; } = null;
/// <summary>
/// Chat Bot User Name ...
/// </summary>
/// <value></value>
public string BotUserName { get; set; }
}
}
+22
View File
@@ -0,0 +1,22 @@
using xModels.Base;
namespace xBotService.Models.Entities
{
/// <summary>
/// Bot User / System User Relation ...
/// </summary>
public class XBotUser : XBaseIntIDEntity
{
/// <summary>
/// User Id ...
/// </summary>
/// <value></value>
public string UserId { get; set; }
/// <summary>
/// Chat Bot User Name ...
/// </summary>
/// <value></value>
public string BotUserName { get; set; }
}
}
@@ -0,0 +1,19 @@
using AutoMapper;
using xDataService.Providers;
using xBotService.Models.Dtos;
using xBotService.Models.Entities;
using System.Collections.Generic;
using xBotService.Interfaces.Entities;
using xBotService.Interfaces.Entities.Dtos;
namespace xBotService.Providers.Dtos
{
public class XBotUserRepositoryService : XBaseRepositoryService<XBotUser, XBotUserDto, int>, IXBotUserRepositoryService
{
public XBotUserRepositoryService(
IXBotUserRepository repository,
IEnumerable<Profile> mapperProfiles = null
) : base(repository, mapperProfiles)
{ }
}
}
@@ -0,0 +1,21 @@
using xDataService.Db;
using xDataService.Providers;
using xDataService.Interfaces;
using xDataService.Configuration;
using xBotService.Models.Entities;
using xBotService.Interfaces.Entities;
namespace xBotService.Providers.Entities
{
public class XBotUserEFRepository<TContext> : XBaseEFRepository<XBotUser, int, TContext>, IXBotUserRepository
where TContext : XDbContext
{
public XBotUserEFRepository(
IXUnitOfWorks<TContext> unitOfWorks,
XDataServiceConfiguration configuration,
IXBotUserKeyGenerator keyGenerator = null,
IXBotUserRepositoryEvents baseRepositoryEvents = null
) : base(unitOfWorks, configuration, keyGenerator, baseRepositoryEvents)
{ }
}
}
@@ -0,0 +1,9 @@
using xDataService.Providers;
using xBotService.Models.Entities;
using xBotService.Interfaces.Entities;
namespace xBotService.Providers.Entities
{
public class XBotUserKeyGenerator : XIntKeyGenerator<XBotUser>, IXBotUserKeyGenerator
{ }
}
@@ -0,0 +1,9 @@
using xDataService.Providers;
using xBotService.Models.Entities;
using xBotService.Interfaces.Entities;
namespace xBotService.Providers.Entities
{
public class XBotUserRepositoryEvents : XBaseRepositoryEvents<XBotUser>, IXBotUserRepositoryEvents
{ }
}
+22
View File
@@ -0,0 +1,22 @@
# xLoggingService
provide all commonly used actions/extensions and classes which required to Bot Management Feature in xDashboard project.
## Implementing
after adding this package as a dependency to your project you can do following:
### 1. Register it on DI
```c#
```
<!-- TOOD: Complete this ... -->
## Maintainer
Hadi Khazaee asl
[https://www.saherelm.ir](https://www.saherelm.ir)
[hadi_khazaee_asl@yahoo.com](mailto:hadi_khazaee_asl@yahoo.com)
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!-- <add key="megan" value="https://hub.megan.ir/nuget/index.json" /> -->
<add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<!-- <add key="baget" value="https://nuget.saherelmhub.ir/v3/index.json" protocolVersion="3" disableTLSCertificateValidation="true" /> -->
</packageSources>
</configuration>
+46
View File
@@ -0,0 +1,46 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Runtime Definition -->
<PropertyGroup>
<Version>1.0.0</Version>
<LangVersion>12.0</LangVersion>
<Authors>Hadi Khazaee Asl</Authors>
<Company>SaherElm IT Center</Company>
<PackageId>xDashboard.xBotService</PackageId>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>
provide all commonly used actions/extensions and classes which required to Bot Management Feature in xDashboard project.
</Description>
<!-- Icon Definition -->
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
<!-- Icon Handling -->
<ItemGroup>
<None Include="../../Documents/Resources/Images/favicon.png" Link="icon.png" Pack="true" PackagePath="\icon.png" />
</ItemGroup>
<!-- Local Modules -->
<ItemGroup>
</ItemGroup>
<!-- Local Dependencies -->
<ItemGroup>
<ProjectReference Include="..\xHttpService\xHttpService.csproj" />
<ProjectReference Include="..\xDataService\xDataService.csproj" />
</ItemGroup>
<!-- Dependencies -->
<ItemGroup>
</ItemGroup>
<!-- For XML Documentation Support -->
<PropertyGroup>
<NoWarn>$(NoWarn);1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
</Project>