Api/Netina.Domain/Entities/Blogs/BlogCategory.cs

23 lines
909 B
C#
Raw Normal View History

2024-04-16 20:01:34 +03:30
using Netina.Common.Models.Entity;
namespace Netina.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
2023-12-16 20:25:12 +03:30
{
public BlogCategory()
{
}
public BlogCategory(string name, string description)
{
Name = name;
Description = description;
}
2023-12-16 20:25:12 +03:30
public string Name { get; internal set; } = string.Empty;
public string Description { get; internal set; } = string.Empty;
public List<Blog> Blogs { get; internal set; } = new();
}