This commit is contained in:
NoKnownName
2025-05-23 10:36:56 +02:00
commit 3fafc10742
168 changed files with 3010 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface ICampaignRepository
{
Campaign GetById(string id);
List<Campaign> GetByOwnerId(string ownerId);
Campaign Add(Campaign campaign);
Campaign Update(Campaign campaign);
bool Delete(string id);
}
}

View File

@@ -0,0 +1,18 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface ICampaignService
{
Campaign GetCampaign(string campaignId);
Campaign CreateCampaign(Dictionary<string, object> campaignData);
Campaign UpdateCampaign(string campaignId, Dictionary<string, object> data);
bool DeleteCampaign(string campaignId);
bool AddSessionToCampaign(string campaignId, string sessionId);
}
}

View File

@@ -0,0 +1,19 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface ICharacterRepository
{
Character GetById(string id);
List<Character> GetByUserId(string userId);
List<Character> GetBySessionId(string sessionId);
Character Add(Character character);
Character Update(Character character);
bool Delete(string id);
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
namespace Interfaces
{
public interface ICharacterService
{
Character GetCharacter(string characterId);
Character CreateCharacter(Dictionary<string, object> characterData);
Character UpdateCharacter(string characterId, Dictionary<string, object> data);
bool DeleteCharacter(string characterId);
bool ValidateCharacterAccess(string userId, string characterId);
}
}

View File

@@ -0,0 +1,16 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface IChatService
{
Message SendMessage(string sessionId, string userId, string message);
List<Message> GetMessages(string sessionId);
bool DeleteMessage(string messageId);
}
}

View File

@@ -0,0 +1,16 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface IDiceRollRepository
{
DiceResult GetById(string id);
List<DiceResult> GetBySessionId(string sessionId);
DiceResult Add(DiceResult diceResult);
}
}

View File

@@ -0,0 +1,16 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface IDiceService
{
DiceResult RollDice(string diceNotation);
bool ValidateRoll(string roll);
List<DiceResult> GetRollHistory(string sessionId);
}
}

View File

@@ -0,0 +1,18 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface IMapRepository
{
Map GetById(string id);
List<Map> GetBySessionId(string sessionId);
Map Add(Map map);
Map Update(Map map);
bool Delete(string id);
}
}

View File

@@ -0,0 +1,21 @@
using Models;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface IMapService
{
Map GetMap(string mapId);
Map CreateMap(Dictionary<string, object> mapData);
Map UpdateMap(string mapId, Dictionary<string, object> data);
bool DeleteMap(string mapId);
Token AddToken(string mapId, Dictionary<string, object> tokenData);
bool MoveToken(string mapId, string tokenId, Point position);
bool RemoveToken(string mapId, string tokenId);
}
}

View File

@@ -0,0 +1,17 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface IMessageRepository
{
Message GetById(string id);
List<Message> GetBySessionId(string sessionId);
Message Add(Message message);
bool Delete(string id);
}
}

View File

@@ -0,0 +1,19 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface ISessionRepository
{
Session GetById(string id);
List<Session> GetByUserId(string userId);
List<Session> GetByCampaignId(string campaignId);
Session Add(Session session);
Session Update(Session session);
bool Delete(string id);
}
}

View File

@@ -0,0 +1,21 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface ISessionService
{
Session GetSession(string sessionId);
Session CreateSession(Dictionary<string, object> sessionData);
Session UpdateSession(string sessionId, Dictionary<string, object> data);
bool DeleteSession(string sessionId);
bool AddPlayerToSession(string sessionId, string userId);
bool RemovePlayerFromSession(string sessionId, string userId);
User GetDungeonMaster(string sessionId);
bool CheckUserPermission(string sessionId, string userId, string resource);
}
}

View File

@@ -0,0 +1,18 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface ITokenRepository
{
Token GetById(string id);
List<Token> GetByMapId(string mapId);
Token Add(Token token);
Token Update(Token token);
bool Delete(string id);
}
}

View File

@@ -0,0 +1,19 @@
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface IUserRepository
{
User GetById(string id);
User GetByUsername(string username);
User GetByEmail(string email);
User Add(User user);
User Update(User user);
bool Delete(string id);
}
}

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Services\Services.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,10 @@
namespace Interfaces
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
}
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Interfaces")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Interfaces")]
[assembly: System.Reflection.AssemblyTitleAttribute("Interfaces")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Von der MSBuild WriteCodeFragment-Klasse generiert.

View File

@@ -0,0 +1 @@
bed3c7bc9fb0d7a33ac10154740d4aa6cebce1c7576d4b7fb7a8f73b59098054

View File

@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Interfaces
build_property.ProjectDir = C:\Users\bib\source\repos\PenAndPaperManager\Interfaces\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

View File

@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]

View File

@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Interfaces")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Interfaces")]
[assembly: System.Reflection.AssemblyTitleAttribute("Interfaces")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Von der MSBuild WriteCodeFragment-Klasse generiert.

View File

@@ -0,0 +1 @@
2944282f82db10db49c093cb5e36512f22b757db57d2e9f88a5d05d4f7d5c0b3

View File

@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Interfaces
build_property.ProjectDir = C:\Users\bib\source\repos\PenAndPaperManager\Interfaces\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

View File

@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1 @@
d384474cd683ea9bec1115a63958af57ca2b8a4cc939005120fc411b0f9dbb0d

View File

@@ -0,0 +1,4 @@
C:\Users\bib\source\repos\PenAndPaperManager\Interfaces\obj\Debug\net8.0\Interfaces.GeneratedMSBuildEditorConfig.editorconfig
C:\Users\bib\source\repos\PenAndPaperManager\Interfaces\obj\Debug\net8.0\Interfaces.AssemblyInfoInputs.cache
C:\Users\bib\source\repos\PenAndPaperManager\Interfaces\obj\Debug\net8.0\Interfaces.AssemblyInfo.cs
C:\Users\bib\source\repos\PenAndPaperManager\Interfaces\obj\Debug\net8.0\Interfaces.csproj.CoreCompileInputs.cache

View File

@@ -0,0 +1,132 @@
{
"format": 1,
"restore": {
"C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Interfaces\\Interfaces.csproj": {}
},
"projects": {
"C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Interfaces\\Interfaces.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Interfaces\\Interfaces.csproj",
"projectName": "Interfaces",
"projectPath": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Interfaces\\Interfaces.csproj",
"packagesPath": "C:\\Users\\bib\\.nuget\\packages\\",
"outputPath": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Interfaces\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\bib\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net8.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {}
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"projectReferences": {
"C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Services\\Services.csproj": {
"projectPath": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Services\\Services.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
}
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.404/PortableRuntimeIdentifierGraph.json"
}
}
},
"C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Services\\Services.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Services\\Services.csproj",
"projectName": "Services",
"projectPath": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Services\\Services.csproj",
"packagesPath": "C:\\Users\\bib\\.nuget\\packages\\",
"outputPath": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Services\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\bib\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net8.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {}
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
}
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.404/PortableRuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\bib\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.11.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\bib\.nuget\packages\" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View File

@@ -0,0 +1,96 @@
{
"version": 3,
"targets": {
"net8.0-windows7.0": {
"Services/1.0.0": {
"type": "project",
"framework": ".NETCoreApp,Version=v8.0",
"compile": {
"bin/placeholder/Services.dll": {}
},
"runtime": {
"bin/placeholder/Services.dll": {}
}
}
}
},
"libraries": {
"Services/1.0.0": {
"type": "project",
"path": "../Services/Services.csproj",
"msbuildProject": "../Services/Services.csproj"
}
},
"projectFileDependencyGroups": {
"net8.0-windows7.0": [
"Services >= 1.0.0"
]
},
"packageFolders": {
"C:\\Users\\bib\\.nuget\\packages\\": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Interfaces\\Interfaces.csproj",
"projectName": "Interfaces",
"projectPath": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Interfaces\\Interfaces.csproj",
"packagesPath": "C:\\Users\\bib\\.nuget\\packages\\",
"outputPath": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Interfaces\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\bib\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net8.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {}
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"projectReferences": {
"C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Services\\Services.csproj": {
"projectPath": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Services\\Services.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
}
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.404/PortableRuntimeIdentifierGraph.json"
}
}
}
}

View File

@@ -0,0 +1,8 @@
{
"version": 2,
"dgSpecHash": "B7Go8bBaaDw=",
"success": true,
"projectFilePath": "C:\\Users\\bib\\source\\repos\\PenAndPaperManager\\Interfaces\\Interfaces.csproj",
"expectedPackageFiles": [],
"logs": []
}