Fix after pr review
This commit is contained in:
parent
d5b9f44e4c
commit
3a2958c706
18
Domain/DTO/UpdateSpell.cs
Normal file
18
Domain/DTO/UpdateSpell.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.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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
16
Domain/Entities/Magician.cs
Normal file
16
Domain/Entities/Magician.cs
Normal 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; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,18 +1,12 @@
|
|||||||
using System;
|
namespace Domain.Entities
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Domain.Entities
|
|
||||||
{
|
{
|
||||||
public class Spell
|
public class Spell
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; private set; }
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public required string Type { get; set; }
|
public required string Type { get; set; }
|
||||||
public required string Description { get; set; }
|
public required string Description { get; set; }
|
||||||
public required string Creator { get; set; }
|
|
||||||
public required DateTime CreationDate { get; set; }
|
public required DateTime CreationDate { get; set; }
|
||||||
|
public required Magician Magician { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace Domain.Filters
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Domain.Filters
|
|
||||||
{
|
{
|
||||||
public class SpellFilter
|
public class SpellFilter
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,10 +1,6 @@
|
|||||||
using Domain.Entities;
|
using Domain.DTO;
|
||||||
|
using Domain.Entities;
|
||||||
using Domain.Filters;
|
using Domain.Filters;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Domain.Repositories
|
namespace Domain.Repositories
|
||||||
{
|
{
|
||||||
@ -13,8 +9,8 @@ namespace Domain.Repositories
|
|||||||
Task<ICollection<Spell>> GetAll();
|
Task<ICollection<Spell>> GetAll();
|
||||||
Task<Spell> GetSpellById(Guid id);
|
Task<Spell> GetSpellById(Guid id);
|
||||||
Task<ICollection<Spell>> GetFilteredSpells(SpellFilter spellfilter);
|
Task<ICollection<Spell>> GetFilteredSpells(SpellFilter spellfilter);
|
||||||
Task<Spell> UpdateSpell(Spell spell);
|
Task<Spell> UpdateSpell(UpdateSpell updateSpellObject);
|
||||||
Task<string> DeleteSpell(Spell spell);
|
Task<bool> DeleteSpell(Guid id);
|
||||||
Task<Spell> CreateSpell(Spell spell);
|
Task<Spell> CreateSpell(Spell spell);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user