Fix after pr review

This commit is contained in:
blyssco 2025-07-24 20:03:19 +02:00
parent d5b9f44e4c
commit 3a2958c706
5 changed files with 42 additions and 24 deletions

18
Domain/DTO/UpdateSpell.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.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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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
{

View File

@ -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<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> UpdateSpell(UpdateSpell updateSpellObject);
Task<bool> DeleteSpell(Guid id);
Task<Spell> CreateSpell(Spell spell);
}
}