From fce43e31ce59bbc5f431d3200d203463f5962638 Mon Sep 17 00:00:00 2001 From: blyssco Date: Thu, 10 Jul 2025 21:08:26 +0200 Subject: [PATCH 1/7] Added the domain part --- Application/Application.csproj | 9 +++++++++ Domain/Domain.csproj | 9 +++++++++ Domain/Entities/Spell.cs | 18 +++++++++++++++++ Domain/Filters/SpellFilter.cs | 20 +++++++++++++++++++ Domain/Repositories/ISpellRepository.cs | 20 +++++++++++++++++++ Infrastructure/Infrastructure.csproj | 9 +++++++++ .../Liber_Incantamentum.Application.csproj | 3 --- .../Liber_Incantamentum.Domain.csproj | 5 ----- .../Liber_Incantamentum.Infrastructure.csproj | 2 -- .../Liber_Incantamentum.Tests.csproj | 2 -- ...er_Incantamentum.API.csproj => API.csproj} | 2 -- Tests/Tests.csproj | 9 +++++++++ 12 files changed, 94 insertions(+), 14 deletions(-) create mode 100644 Application/Application.csproj create mode 100644 Domain/Domain.csproj create mode 100644 Domain/Entities/Spell.cs create mode 100644 Domain/Filters/SpellFilter.cs create mode 100644 Domain/Repositories/ISpellRepository.cs create mode 100644 Infrastructure/Infrastructure.csproj rename Liber_Incantamentum/{Liber_Incantamentum.API.csproj => API.csproj} (82%) create mode 100644 Tests/Tests.csproj diff --git a/Application/Application.csproj b/Application/Application.csproj new file mode 100644 index 0000000..125f4c9 --- /dev/null +++ b/Application/Application.csproj @@ -0,0 +1,9 @@ + + + + net9.0 + enable + enable + + + diff --git a/Domain/Domain.csproj b/Domain/Domain.csproj new file mode 100644 index 0000000..125f4c9 --- /dev/null +++ b/Domain/Domain.csproj @@ -0,0 +1,9 @@ + + + + net9.0 + enable + enable + + + diff --git a/Domain/Entities/Spell.cs b/Domain/Entities/Spell.cs new file mode 100644 index 0000000..0d1c830 --- /dev/null +++ b/Domain/Entities/Spell.cs @@ -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; } + } +} diff --git a/Domain/Filters/SpellFilter.cs b/Domain/Filters/SpellFilter.cs new file mode 100644 index 0000000..d17fb0c --- /dev/null +++ b/Domain/Filters/SpellFilter.cs @@ -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; } + + } +} diff --git a/Domain/Repositories/ISpellRepository.cs b/Domain/Repositories/ISpellRepository.cs new file mode 100644 index 0000000..6629d96 --- /dev/null +++ b/Domain/Repositories/ISpellRepository.cs @@ -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> GetAll(); + Task GetSpellById(Guid id); + Task> GetFilteredSpells(SpellFilter spellfilter); + Task UpdateSpell(Spell spell); + Task DeleteSpell(Spell spell); + Task CreateSpell(Spell spell); + } +} diff --git a/Infrastructure/Infrastructure.csproj b/Infrastructure/Infrastructure.csproj new file mode 100644 index 0000000..125f4c9 --- /dev/null +++ b/Infrastructure/Infrastructure.csproj @@ -0,0 +1,9 @@ + + + + net9.0 + enable + enable + + + diff --git a/Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj b/Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj index fefd871..db9338c 100644 --- a/Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj +++ b/Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj @@ -7,9 +7,6 @@ - - - diff --git a/Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj b/Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj index d732c4a..db9338c 100644 --- a/Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj +++ b/Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj @@ -7,11 +7,6 @@ - - - - - diff --git a/Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj b/Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj index c4f9216..db9338c 100644 --- a/Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj +++ b/Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj @@ -7,8 +7,6 @@ - - diff --git a/Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj b/Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj index 6c83ff3..db9338c 100644 --- a/Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj +++ b/Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj @@ -7,8 +7,6 @@ - - diff --git a/Liber_Incantamentum/Liber_Incantamentum.API.csproj b/Liber_Incantamentum/API.csproj similarity index 82% rename from Liber_Incantamentum/Liber_Incantamentum.API.csproj rename to Liber_Incantamentum/API.csproj index 11b4c78..b764994 100644 --- a/Liber_Incantamentum/Liber_Incantamentum.API.csproj +++ b/Liber_Incantamentum/API.csproj @@ -11,8 +11,6 @@ - - diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj new file mode 100644 index 0000000..125f4c9 --- /dev/null +++ b/Tests/Tests.csproj @@ -0,0 +1,9 @@ + + + + net9.0 + enable + enable + + + -- 2.47.2 From f78dfe745fde4a7044b43a2cc8a64408d60ff464 Mon Sep 17 00:00:00 2001 From: blyssco Date: Thu, 10 Jul 2025 21:10:37 +0200 Subject: [PATCH 2/7] Sync solution --- Liber_Incantamentum.sln | 42 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Liber_Incantamentum.sln b/Liber_Incantamentum.sln index 480ae1a..f918d2b 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}") = "API", "Liber_Incantamentum\API.csproj", "{BB761821-A9EC-4EBA-83A2-89F32C50041F}" 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}") = "Domain", "Domain\Domain.csproj", "{C045CEDF-9EC0-462F-BA36-B46D80047349}" 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}") = "Infrastructure", "Infrastructure\Infrastructure.csproj", "{4592C924-1FF7-4819-B918-3EDA45358184}" 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}") = "Tests", "Tests\Tests.csproj", "{A74B1272-70D9-4745-91E8-76F87872F776}" 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}") = "Application", "Application\Application.csproj", "{D322A7B3-D7B0-4A55-8D9F-C205F6BBD168}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -23,22 +23,22 @@ Global {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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE -- 2.47.2 From 99118ddb84719fcbd008f76a27e600a783415d03 Mon Sep 17 00:00:00 2001 From: blyssco Date: Fri, 11 Jul 2025 20:26:24 +0200 Subject: [PATCH 3/7] Clean old folders --- .../Liber_Incantamentum.API.csproj | 9 --------- .../Liber_Incantamentum.Application.csproj | 12 ------------ .../Liber_Incantamentum.Domain.csproj | 12 ------------ .../Liber_Incantamentum.Infrastructure.csproj | 12 ------------ .../Liber_Incantamentum.Tests.csproj | 12 ------------ 5 files changed, 57 deletions(-) delete mode 100644 Liber_Incantamentum.API/Liber_Incantamentum.API.csproj delete mode 100644 Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj delete mode 100644 Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj delete mode 100644 Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj delete mode 100644 Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj diff --git a/Liber_Incantamentum.API/Liber_Incantamentum.API.csproj b/Liber_Incantamentum.API/Liber_Incantamentum.API.csproj deleted file mode 100644 index 125f4c9..0000000 --- a/Liber_Incantamentum.API/Liber_Incantamentum.API.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - net9.0 - enable - enable - - - diff --git a/Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj b/Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj deleted file mode 100644 index db9338c..0000000 --- a/Liber_Incantamentum.Application/Liber_Incantamentum.Application.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - net9.0 - enable - enable - - - - - - diff --git a/Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj b/Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj deleted file mode 100644 index db9338c..0000000 --- a/Liber_Incantamentum.Domain/Liber_Incantamentum.Domain.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - net9.0 - enable - enable - - - - - - diff --git a/Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj b/Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj deleted file mode 100644 index db9338c..0000000 --- a/Liber_Incantamentum.Infrastructure/Liber_Incantamentum.Infrastructure.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - net9.0 - enable - enable - - - - - - diff --git a/Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj b/Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj deleted file mode 100644 index db9338c..0000000 --- a/Liber_Incantamentum.Tests/Liber_Incantamentum.Tests.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - net9.0 - enable - enable - - - - - - -- 2.47.2 From d5b9f44e4c5df8167defd959a7db30c5185f49be Mon Sep 17 00:00:00 2001 From: blyssco Date: Fri, 11 Jul 2025 20:31:03 +0200 Subject: [PATCH 4/7] clean solution --- {Liber_Incantamentum => API}/API.csproj | 3 --- {Liber_Incantamentum => API}/Program.cs | 0 .../Properties/launchSettings.json | 4 ++-- .../appsettings.Development.json | 0 {Liber_Incantamentum => API}/appsettings.json | 0 Liber_Incantamentum.sln | 12 ++++++------ Liber_Incantamentum/Liber_Incantamentum.http | 6 ------ 7 files changed, 8 insertions(+), 17 deletions(-) rename {Liber_Incantamentum => API}/API.csproj (91%) rename {Liber_Incantamentum => API}/Program.cs (100%) rename {Liber_Incantamentum => API}/Properties/launchSettings.json (80%) rename {Liber_Incantamentum => API}/appsettings.Development.json (100%) rename {Liber_Incantamentum => API}/appsettings.json (100%) delete mode 100644 Liber_Incantamentum/Liber_Incantamentum.http diff --git a/Liber_Incantamentum/API.csproj b/API/API.csproj similarity index 91% rename from Liber_Incantamentum/API.csproj rename to API/API.csproj index b764994..1fc25bd 100644 --- a/Liber_Incantamentum/API.csproj +++ b/API/API.csproj @@ -10,7 +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.sln b/Liber_Incantamentum.sln index f918d2b..3296eae 100644 --- a/Liber_Incantamentum.sln +++ b/Liber_Incantamentum.sln @@ -3,8 +3,6 @@ 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}") = "API", "Liber_Incantamentum\API.csproj", "{BB761821-A9EC-4EBA-83A2-89F32C50041F}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "Domain\Domain.csproj", "{C045CEDF-9EC0-462F-BA36-B46D80047349}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "Infrastructure\Infrastructure.csproj", "{4592C924-1FF7-4819-B918-3EDA45358184}" @@ -13,16 +11,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "Application\Application.csproj", "{D322A7B3-D7B0-4A55-8D9F-C205F6BBD168}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "API", "API\API.csproj", "{35729053-7C6D-4D90-80AD-6A0ACF0B9778}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU 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 {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 @@ -39,6 +35,10 @@ Global {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 - -### -- 2.47.2 From 3a2958c7061b028de2b32d8d33deaa258e082a0d Mon Sep 17 00:00:00 2001 From: blyssco Date: Thu, 24 Jul 2025 20:03:19 +0200 Subject: [PATCH 5/7] Fix after pr review --- Domain/DTO/UpdateSpell.cs | 18 ++++++++++++++++++ Domain/Entities/Magician.cs | 16 ++++++++++++++++ Domain/Entities/Spell.cs | 12 +++--------- Domain/Filters/SpellFilter.cs | 8 +------- Domain/Repositories/ISpellRepository.cs | 12 ++++-------- 5 files changed, 42 insertions(+), 24 deletions(-) create mode 100644 Domain/DTO/UpdateSpell.cs create mode 100644 Domain/Entities/Magician.cs diff --git a/Domain/DTO/UpdateSpell.cs b/Domain/DTO/UpdateSpell.cs new file mode 100644 index 0000000..6e00350 --- /dev/null +++ b/Domain/DTO/UpdateSpell.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +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; } + } +} diff --git a/Domain/Entities/Magician.cs b/Domain/Entities/Magician.cs new file mode 100644 index 0000000..145594e --- /dev/null +++ b/Domain/Entities/Magician.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +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 index 0d1c830..61d7467 100644 --- a/Domain/Entities/Spell.cs +++ b/Domain/Entities/Spell.cs @@ -1,18 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Domain.Entities +namespace Domain.Entities { public class Spell { - public Guid Id { get; set; } + 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 string Creator { 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 index d17fb0c..356b5fd 100644 --- a/Domain/Filters/SpellFilter.cs +++ b/Domain/Filters/SpellFilter.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Domain.Filters +namespace Domain.Filters { public class SpellFilter { diff --git a/Domain/Repositories/ISpellRepository.cs b/Domain/Repositories/ISpellRepository.cs index 6629d96..a9b929f 100644 --- a/Domain/Repositories/ISpellRepository.cs +++ b/Domain/Repositories/ISpellRepository.cs @@ -1,10 +1,6 @@ -using Domain.Entities; +using Domain.DTO; +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 { @@ -13,8 +9,8 @@ namespace Domain.Repositories Task> GetAll(); Task GetSpellById(Guid id); Task> GetFilteredSpells(SpellFilter spellfilter); - Task UpdateSpell(Spell spell); - Task DeleteSpell(Spell spell); + Task UpdateSpell(UpdateSpell updateSpellObject); + Task DeleteSpell(Guid id); Task CreateSpell(Spell spell); } } -- 2.47.2 From 65e564b44cd727ea94353c31e5e4f65988449ef2 Mon Sep 17 00:00:00 2001 From: blyssco Date: Thu, 24 Jul 2025 20:06:49 +0200 Subject: [PATCH 6/7] Fix Ajout Magician dans le UpdateSpell --- Domain/DTO/UpdateSpell.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Domain/DTO/UpdateSpell.cs b/Domain/DTO/UpdateSpell.cs index 6e00350..420a4f7 100644 --- a/Domain/DTO/UpdateSpell.cs +++ b/Domain/DTO/UpdateSpell.cs @@ -1,4 +1,5 @@ -using System; +using Domain.Entities; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -14,5 +15,6 @@ namespace Domain.DTO public string? Type { get; set; } public string? Creator { get; set; } public DateTime? CreationDate { get; set; } + public Magician? Magician { get; set; } } } -- 2.47.2 From b05e08bb5a51c4b03453aa344909a5ae0e287648 Mon Sep 17 00:00:00 2001 From: blyssco Date: Thu, 24 Jul 2025 20:07:38 +0200 Subject: [PATCH 7/7] Nettoyage --- Domain/DTO/UpdateSpell.cs | 9 ++------- Domain/Entities/Magician.cs | 8 +------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Domain/DTO/UpdateSpell.cs b/Domain/DTO/UpdateSpell.cs index 420a4f7..3f270ad 100644 --- a/Domain/DTO/UpdateSpell.cs +++ b/Domain/DTO/UpdateSpell.cs @@ -1,16 +1,11 @@ using Domain.Entities; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Domain.DTO { public class UpdateSpell { - public required Guid id { get; set; } - public string? Name { get; set; } + 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; } diff --git a/Domain/Entities/Magician.cs b/Domain/Entities/Magician.cs index 145594e..b90089e 100644 --- a/Domain/Entities/Magician.cs +++ b/Domain/Entities/Magician.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Domain.Entities +namespace Domain.Entities { public class Magician { -- 2.47.2