Api/Netina.Domain/Entities/Brands/Brand.cs

33 lines
1.4 KiB
C#

using Netina.Common.Models.Entity;
using Netina.Domain.Entities.Products;
namespace Netina.Domain.Entities.Brands;
[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 Brand : ApiEntity
{
public Brand()
{
}
public Brand(string persianName,string englishName, string description, bool hasSpecialPage, string pageUrl)
{
PersianName = persianName;
EnglishName = englishName;
Description = description;
HasSpecialPage = hasSpecialPage;
PageUrl = pageUrl;
}
public string PersianName { get; internal set; } = string.Empty;
public string EnglishName { get; internal set; } = string.Empty;
public string Description { get; internal set; } = string.Empty;
public bool HasSpecialPage { get; internal set; }
public string PageUrl { get; internal set; } = string.Empty;
public List<Product> Products { get; internal set; } = new();
public List<BrandStorageFile> Files { get; internal set; } = new();
}