34 lines
1.4 KiB
C#
34 lines
1.4 KiB
C#
namespace HamyanEdalat.Domain.Entities.Blogs;
|
|
|
|
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
|
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)]
|
|
[AdaptTo("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
|
|
[GenerateMapper]
|
|
|
|
public partial class Blog : ApiEntity
|
|
{
|
|
public Blog()
|
|
{
|
|
|
|
}
|
|
public Blog(string title,string content,string tags, int readingTime,string summery, bool isSuggested, Guid categoryId)
|
|
{
|
|
Title = title;
|
|
Content = content;
|
|
Tags = tags;
|
|
ReadingTime = readingTime;
|
|
Summery = summery;
|
|
IsSuggested = isSuggested;
|
|
CategoryId = categoryId;
|
|
}
|
|
public string Title { get; internal set; } = string.Empty;
|
|
public string Content { get; internal set; } = string.Empty;
|
|
public string Tags { get; internal set; } = string.Empty;
|
|
public int ReadingTime { get; internal set; }
|
|
public string Summery { get; internal set; } = string.Empty;
|
|
public bool IsSuggested { get; internal set; }
|
|
public Guid CategoryId { get; internal set; }
|
|
public BlogCategory? Category { get; internal set; }
|
|
public List<BlogStorageFile> Files { get; internal set; } = new();
|
|
|
|
} |