You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
605 B
23 lines
605 B
using ApiLol.Mapper.enums;
|
|
using DTO;
|
|
using Model;
|
|
|
|
namespace ApiLol.Mapper
|
|
{
|
|
public static class RuneMapper
|
|
{
|
|
public static RuneDto ToDto(this Rune rune)
|
|
=> new()
|
|
{
|
|
Name = rune.Name,
|
|
Description = rune.Description,
|
|
Family = rune.Family.ToDto(),
|
|
Icon = rune.Icon,
|
|
Image = rune.Image.ToDto()
|
|
};
|
|
|
|
public static Rune ToModel(this RuneDto rune) => new(rune.Name, rune.Family.ToModel(), rune.Icon, rune.Image.Base64, rune.Description);
|
|
|
|
}
|
|
}
|