40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using DomainObjects.Abstractions.Posts;
|
|
|
|
namespace DomainObjects.Documents.Posts;
|
|
|
|
public class ShopDocument : PostItemBase<ShopDocument>
|
|
{
|
|
public string BrandName { get; set; }
|
|
public string Sku { get; set; }
|
|
public decimal? Rating { get; set; }
|
|
public decimal Price { get; set; }
|
|
public decimal? NewPrice { get; set; }
|
|
public uint Quantity { get; set; }
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
unchecked
|
|
{
|
|
int hash = 17;
|
|
hash = hash * 23 + Id.GetHashCode();
|
|
hash = hash * 23 + SiteId.GetHashCode();
|
|
hash = hash * 23 + L10n.GetHashCode();
|
|
if (MediaAttachments != null)
|
|
hash = hash * 23 + MediaAttachments.Sum(x => x.GetHashCode());
|
|
hash = hash * 23 + Author.GetHashCode();
|
|
hash = hash * 23 + Created.GetHashCode();
|
|
hash = hash * 23 + Tags.GetHashCode();
|
|
hash = hash * 23 + Categories.Sum(x => x.GetHashCode());
|
|
|
|
hash = hash * 23 + BrandName.GetHashCode();
|
|
hash = hash * 23 + Sku.GetHashCode();
|
|
hash = hash * 23 + Rating.GetHashCode();
|
|
hash = hash * 23 + Price.GetHashCode();
|
|
hash = hash * 23 + NewPrice.GetHashCode();
|
|
hash = hash * 23 + Quantity.GetHashCode();
|
|
|
|
return hash;
|
|
}
|
|
}
|
|
}
|