2024-04-22 13:33:39 +03:30
|
|
|
|
namespace Netina.Domain.Entities.Blogs;
|
2023-12-20 10:37:44 +03:30
|
|
|
|
[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
|
2023-12-16 20:25:12 +03:30
|
|
|
|
{
|
2023-12-20 10:37:44 +03:30
|
|
|
|
public BlogCategory()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-07 11:01:55 +03:30
|
|
|
|
public BlogCategory(string name,string slug, string description,bool isMain)
|
2023-12-20 10:37:44 +03:30
|
|
|
|
{
|
|
|
|
|
|
Name = name;
|
2024-04-23 12:09:32 +03:30
|
|
|
|
Slug = slug;
|
2023-12-20 10:37:44 +03:30
|
|
|
|
Description = description;
|
2024-05-07 11:01:55 +03:30
|
|
|
|
IsMain = isMain;
|
2023-12-20 10:37:44 +03:30
|
|
|
|
}
|
2023-12-16 20:25:12 +03:30
|
|
|
|
public string Name { get; internal set; } = string.Empty;
|
2024-04-23 23:57:52 +03:30
|
|
|
|
public string Slug { get; internal set; } = string.Empty;
|
2023-12-16 20:25:12 +03:30
|
|
|
|
public string Description { get; internal set; } = string.Empty;
|
2024-05-07 11:01:55 +03:30
|
|
|
|
public bool IsMain { get; set; }
|
|
|
|
|
|
public Guid? ParentId { get; set; }
|
|
|
|
|
|
public BlogCategory? Parent { get; set; }
|
2023-12-16 20:25:12 +03:30
|
|
|
|
public List<Blog> Blogs { get; internal set; } = new();
|
|
|
|
|
|
}
|