Added the domain part

This commit is contained in:
blyssco 2025-07-10 21:08:26 +02:00
parent 659d263ea7
commit fce43e31ce
12 changed files with 94 additions and 14 deletions

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

9
Domain/Domain.csproj Normal file
View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

18
Domain/Entities/Spell.cs Normal file
View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Domain.Entities
{
public class Spell
{
public Guid Id { get; set; }
public required string Name { get; set; }
public required string Type { get; set; }
public required string Description { get; set; }
public required string Creator { get; set; }
public required DateTime CreationDate { get; set; }
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Domain.Filters
{
public class SpellFilter
{
public Guid? Id { get; set; }
public string? Name { get; set; }
public string? Type { get; set; }
public string? Description { get; set; }
public string? Creator { get; set; }
public DateTime? FromDate { get; set; }
public DateTime? ToDate { get; set; }
}
}

View File

@ -0,0 +1,20 @@
using Domain.Entities;
using Domain.Filters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Domain.Repositories
{
public interface ISpellRepository
{
Task<ICollection<Spell>> GetAll();
Task<Spell> GetSpellById(Guid id);
Task<ICollection<Spell>> GetFilteredSpells(SpellFilter spellfilter);
Task<Spell> UpdateSpell(Spell spell);
Task<string> DeleteSpell(Spell spell);
Task<Spell> CreateSpell(Spell spell);
}
}

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -7,9 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="DTOs\" />
<Folder Include="Interfaces\" />
<Folder Include="Services\" />
</ItemGroup>
</Project>

View File

@ -7,11 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="Entities\" />
<Folder Include="Exceptions\" />
<Folder Include="DomainEvents\" />
<Folder Include="ValueObjects\" />
<Folder Include="Repositories\" />
</ItemGroup>
</Project>

View File

@ -7,8 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="Data\" />
<Folder Include="Repositories\" />
</ItemGroup>
</Project>

View File

@ -7,8 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="IntegrationTests\" />
<Folder Include="UnitTests\" />
</ItemGroup>
</Project>

View File

@ -11,8 +11,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
<Folder Include="Middlewares\" />
</ItemGroup>
</Project>

9
Tests/Tests.csproj Normal file
View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>