Api/NetinaShop.Domain/Dtos/SmallDtos/BasePageSDto.cs

17 lines
613 B
C#

using NetinaShop.Domain.MartenEntities.Pages;
using Newtonsoft.Json;
namespace NetinaShop.Domain.Dtos.SmallDtos;
public class BasePageSDto : BaseDto<BasePageSDto,BasePage>
{
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public bool IsCustomPage { get; set; }
public bool IsHtmlBasePage { get; set; }
public string Slug { get; set; } = string.Empty;
public string Data { get; set; } = string.Empty;
public T GetData<T>() => JsonConvert.DeserializeObject<T>(Data);
}