diff --git a/Liber_Incantamentum/Liber_Incantamentum.API.csproj b/API/API.csproj
similarity index 75%
rename from Liber_Incantamentum/Liber_Incantamentum.API.csproj
rename to API/API.csproj
index 11b4c78..1fc25bd 100644
--- a/Liber_Incantamentum/Liber_Incantamentum.API.csproj
+++ b/API/API.csproj
@@ -10,9 +10,4 @@
-
-
-
-
-
diff --git a/Liber_Incantamentum/Program.cs b/API/Program.cs
similarity index 100%
rename from Liber_Incantamentum/Program.cs
rename to API/Program.cs
diff --git a/Liber_Incantamentum/Properties/launchSettings.json b/API/Properties/launchSettings.json
similarity index 80%
rename from Liber_Incantamentum/Properties/launchSettings.json
rename to API/Properties/launchSettings.json
index 92c536d..38c4856 100644
--- a/Liber_Incantamentum/Properties/launchSettings.json
+++ b/API/Properties/launchSettings.json
@@ -5,7 +5,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
- "applicationUrl": "http://localhost:5225",
+ "applicationUrl": "http://localhost:5044",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
@@ -14,7 +14,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
- "applicationUrl": "https://localhost:7239;http://localhost:5225",
+ "applicationUrl": "https://localhost:7217;http://localhost:5044",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
diff --git a/Liber_Incantamentum/appsettings.Development.json b/API/appsettings.Development.json
similarity index 100%
rename from Liber_Incantamentum/appsettings.Development.json
rename to API/appsettings.Development.json
diff --git a/Liber_Incantamentum/appsettings.json b/API/appsettings.json
similarity index 100%
rename from Liber_Incantamentum/appsettings.json
rename to API/appsettings.json
diff --git a/Liber_Incantamentum.API/Liber_Incantamentum.API.csproj b/Application/Application.csproj
similarity index 100%
rename from Liber_Incantamentum.API/Liber_Incantamentum.API.csproj
rename to Application/Application.csproj
diff --git a/Domain/DTO/UpdateSpell.cs b/Domain/DTO/UpdateSpell.cs
new file mode 100644
index 0000000..3f270ad
--- /dev/null
+++ b/Domain/DTO/UpdateSpell.cs
@@ -0,0 +1,15 @@
+using Domain.Entities;
+
+namespace Domain.DTO
+{
+ public class UpdateSpell
+ {
+ public required Guid id { get; set; }
+ public string? Name { get; set; }
+ public string? Description { get; set; }
+ public string? Type { get; set; }
+ public string? Creator { get; set; }
+ public DateTime? CreationDate { get; set; }
+ public Magician? Magician { get; set; }
+ }
+}
diff --git a/Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj b/Domain/Domain.csproj
similarity index 67%
rename from Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj
rename to Domain/Domain.csproj
index c4f9216..125f4c9 100644
--- a/Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj
+++ b/Domain/Domain.csproj
@@ -6,9 +6,4 @@
enable
-
-
-
-
-
diff --git a/Domain/Entities/Magician.cs b/Domain/Entities/Magician.cs
new file mode 100644
index 0000000..b90089e
--- /dev/null
+++ b/Domain/Entities/Magician.cs
@@ -0,0 +1,10 @@
+namespace Domain.Entities
+{
+ public class Magician
+ {
+ public Guid Id { get; private set; }
+ public required string Name { get; set; }
+ public required string Speciality { get; set; }
+
+ }
+}
diff --git a/Domain/Entities/Spell.cs b/Domain/Entities/Spell.cs
new file mode 100644
index 0000000..61d7467
--- /dev/null
+++ b/Domain/Entities/Spell.cs
@@ -0,0 +1,12 @@
+namespace Domain.Entities
+{
+ public class Spell
+ {
+ public Guid Id { get; private set; }
+ public required string Name { get; set; }
+ public required string Type { get; set; }
+ public required string Description { get; set; }
+ public required DateTime CreationDate { get; set; }
+ public required Magician Magician { get; set; }
+ }
+}
diff --git a/Domain/Filters/SpellFilter.cs b/Domain/Filters/SpellFilter.cs
new file mode 100644
index 0000000..356b5fd
--- /dev/null
+++ b/Domain/Filters/SpellFilter.cs
@@ -0,0 +1,14 @@
+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; }
+
+ }
+}
diff --git a/Domain/Repositories/ISpellRepository.cs b/Domain/Repositories/ISpellRepository.cs
new file mode 100644
index 0000000..a9b929f
--- /dev/null
+++ b/Domain/Repositories/ISpellRepository.cs
@@ -0,0 +1,16 @@
+using Domain.DTO;
+using Domain.Entities;
+using Domain.Filters;
+
+namespace Domain.Repositories
+{
+ public interface ISpellRepository
+ {
+ Task> GetAll();
+ Task GetSpellById(Guid id);
+ Task> GetFilteredSpells(SpellFilter spellfilter);
+ Task UpdateSpell(UpdateSpell updateSpellObject);
+ Task DeleteSpell(Guid id);
+ Task CreateSpell(Spell spell);
+ }
+}
diff --git a/Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj b/Infrastructure/Infrastructure.csproj
similarity index 65%
rename from Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj
rename to Infrastructure/Infrastructure.csproj
index 6c83ff3..125f4c9 100644
--- a/Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj
+++ b/Infrastructure/Infrastructure.csproj
@@ -6,9 +6,4 @@
enable
-
-
-
-
-
diff --git a/Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj b/Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj
deleted file mode 100644
index d732c4a..0000000
--- a/Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- net9.0
- enable
- enable
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Liber_Incantamentum.sln b/Liber_Incantamentum.sln
index 480ae1a..3296eae 100644
--- a/Liber_Incantamentum.sln
+++ b/Liber_Incantamentum.sln
@@ -3,15 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36109.1
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.API", "Liber_Incantamentum\Liber_Incantamentum.API.csproj", "{BB761821-A9EC-4EBA-83A2-89F32C50041F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "Domain\Domain.csproj", "{C045CEDF-9EC0-462F-BA36-B46D80047349}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.Domain", "Liber_Incantamentum.Domain\Liber_Incantamentum.Domain.csproj", "{7DF16F8F-C307-455F-8389-5F0B90281347}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "Infrastructure\Infrastructure.csproj", "{4592C924-1FF7-4819-B918-3EDA45358184}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.Application", "Liber_Incantamentum.Application\Liber_Incantamentum.Application.csproj", "{1307DD24-0090-4C5A-B56F-8A815DF46AB9}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{A74B1272-70D9-4745-91E8-76F87872F776}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.Infrastructure", "Liber_Incantamentum.Infrastructure\Liber_Incantamentum.Infrastructure.csproj", "{C80C19DC-06DA-45DD-ADEE-2BB0F670A014}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "Application\Application.csproj", "{D322A7B3-D7B0-4A55-8D9F-C205F6BBD168}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.Tests", "Liber_Incantamentum.Tests\Liber_Incantamentum.Tests.csproj", "{4C656BB8-ED7B-422A-A984-75522021B031}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "API", "API\API.csproj", "{35729053-7C6D-4D90-80AD-6A0ACF0B9778}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,26 +19,26 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {BB761821-A9EC-4EBA-83A2-89F32C50041F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BB761821-A9EC-4EBA-83A2-89F32C50041F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BB761821-A9EC-4EBA-83A2-89F32C50041F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BB761821-A9EC-4EBA-83A2-89F32C50041F}.Release|Any CPU.Build.0 = Release|Any CPU
- {7DF16F8F-C307-455F-8389-5F0B90281347}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7DF16F8F-C307-455F-8389-5F0B90281347}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7DF16F8F-C307-455F-8389-5F0B90281347}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7DF16F8F-C307-455F-8389-5F0B90281347}.Release|Any CPU.Build.0 = Release|Any CPU
- {1307DD24-0090-4C5A-B56F-8A815DF46AB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1307DD24-0090-4C5A-B56F-8A815DF46AB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1307DD24-0090-4C5A-B56F-8A815DF46AB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1307DD24-0090-4C5A-B56F-8A815DF46AB9}.Release|Any CPU.Build.0 = Release|Any CPU
- {C80C19DC-06DA-45DD-ADEE-2BB0F670A014}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C80C19DC-06DA-45DD-ADEE-2BB0F670A014}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C80C19DC-06DA-45DD-ADEE-2BB0F670A014}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C80C19DC-06DA-45DD-ADEE-2BB0F670A014}.Release|Any CPU.Build.0 = Release|Any CPU
- {4C656BB8-ED7B-422A-A984-75522021B031}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4C656BB8-ED7B-422A-A984-75522021B031}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4C656BB8-ED7B-422A-A984-75522021B031}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4C656BB8-ED7B-422A-A984-75522021B031}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C045CEDF-9EC0-462F-BA36-B46D80047349}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C045CEDF-9EC0-462F-BA36-B46D80047349}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C045CEDF-9EC0-462F-BA36-B46D80047349}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C045CEDF-9EC0-462F-BA36-B46D80047349}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4592C924-1FF7-4819-B918-3EDA45358184}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4592C924-1FF7-4819-B918-3EDA45358184}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4592C924-1FF7-4819-B918-3EDA45358184}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4592C924-1FF7-4819-B918-3EDA45358184}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A74B1272-70D9-4745-91E8-76F87872F776}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A74B1272-70D9-4745-91E8-76F87872F776}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A74B1272-70D9-4745-91E8-76F87872F776}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A74B1272-70D9-4745-91E8-76F87872F776}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D322A7B3-D7B0-4A55-8D9F-C205F6BBD168}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D322A7B3-D7B0-4A55-8D9F-C205F6BBD168}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D322A7B3-D7B0-4A55-8D9F-C205F6BBD168}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D322A7B3-D7B0-4A55-8D9F-C205F6BBD168}.Release|Any CPU.Build.0 = Release|Any CPU
+ {35729053-7C6D-4D90-80AD-6A0ACF0B9778}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {35729053-7C6D-4D90-80AD-6A0ACF0B9778}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {35729053-7C6D-4D90-80AD-6A0ACF0B9778}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {35729053-7C6D-4D90-80AD-6A0ACF0B9778}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Liber_Incantamentum/Liber_Incantamentum.http b/Liber_Incantamentum/Liber_Incantamentum.http
deleted file mode 100644
index 0d48534..0000000
--- a/Liber_Incantamentum/Liber_Incantamentum.http
+++ /dev/null
@@ -1,6 +0,0 @@
-@Liber_Incantamentum_HostAddress = http://localhost:5225
-
-GET {{Liber_Incantamentum_HostAddress}}/weatherforecast/
-Accept: application/json
-
-###
diff --git a/Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj b/Tests/Tests.csproj
similarity index 61%
rename from Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj
rename to Tests/Tests.csproj
index fefd871..125f4c9 100644
--- a/Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj
+++ b/Tests/Tests.csproj
@@ -6,10 +6,4 @@
enable
-
-
-
-
-
-