Added the domain part
This commit is contained in:
parent
659d263ea7
commit
fce43e31ce
9
Application/Application.csproj
Normal file
9
Application/Application.csproj
Normal 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
9
Domain/Domain.csproj
Normal 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
18
Domain/Entities/Spell.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
20
Domain/Filters/SpellFilter.cs
Normal file
20
Domain/Filters/SpellFilter.cs
Normal 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; }
|
||||
|
||||
}
|
||||
}
|
||||
20
Domain/Repositories/ISpellRepository.cs
Normal file
20
Domain/Repositories/ISpellRepository.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
9
Infrastructure/Infrastructure.csproj
Normal file
9
Infrastructure/Infrastructure.csproj
Normal file
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@ -7,9 +7,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="DTOs\" />
|
||||
<Folder Include="Interfaces\" />
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -7,11 +7,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Entities\" />
|
||||
<Folder Include="Exceptions\" />
|
||||
<Folder Include="DomainEvents\" />
|
||||
<Folder Include="ValueObjects\" />
|
||||
<Folder Include="Repositories\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -7,8 +7,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Data\" />
|
||||
<Folder Include="Repositories\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -7,8 +7,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="IntegrationTests\" />
|
||||
<Folder Include="UnitTests\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -11,8 +11,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
<Folder Include="Middlewares\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
9
Tests/Tests.csproj
Normal file
9
Tests/Tests.csproj
Normal file
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Loading…
x
Reference in New Issue
Block a user