api/HamyanEdalat.Domain/Entities/Blogs/BlogCategory.cs

21 lines
879 B
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 BlogCategory : ApiEntity
{
public BlogCategory()
{
}
public BlogCategory(string name, string description)
{
Name = name;
Description = description;
}
public string Name { get; internal set; } = string.Empty;
public string Description { get; internal set; } = string.Empty;
public List<Blog> Blogs { get; internal set; } = new();
}