33 lines
1.4 KiB
C#
33 lines
1.4 KiB
C#
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]
|
|
|
|
//[Index(nameof(Slug), IsUnique = true)]
|
|
public partial class Brand : ApiEntity
|
|
{
|
|
public Brand()
|
|
{
|
|
|
|
}
|
|
|
|
public Brand(string persianName,string slug,string englishName, string description, bool hasSpecialPage, string pageUrl)
|
|
{
|
|
PersianName = persianName;
|
|
Slug = slug;
|
|
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 Slug { 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();
|
|
} |