Init
This commit is contained in:
42
Prefab.Web.Client/ViewModels/Catalog/ProductCardModel.cs
Normal file
42
Prefab.Web.Client/ViewModels/Catalog/ProductCardModel.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using Prefab.Web.Client.Models.Shared;
|
||||
|
||||
namespace Prefab.Web.Client.ViewModels.Catalog;
|
||||
|
||||
public sealed class ProductCardModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
public string Slug { get; set; } = string.Empty;
|
||||
|
||||
public string? PrimaryImageUrl { get; set; }
|
||||
|
||||
public string? SecondaryImageUrl { get; set; }
|
||||
|
||||
public string? CategoryName { get; set; }
|
||||
|
||||
public string? CategoryUrl { get; set; }
|
||||
|
||||
public MoneyModel? FromPrice { get; set; }
|
||||
|
||||
public bool IsPriced { get; set; }
|
||||
|
||||
public decimal? OldPrice { get; set; }
|
||||
|
||||
public bool IsOnSale { get; set; }
|
||||
|
||||
public int Rating { get; set; }
|
||||
|
||||
public int ReviewCount { get; set; }
|
||||
|
||||
public IList<string> Badges { get; set; } = new List<string>();
|
||||
|
||||
public string? Sku { get; set; }
|
||||
|
||||
public DateTimeOffset LastModifiedOn { get; set; }
|
||||
|
||||
public bool HasPrice => IsPriced && FromPrice is not null;
|
||||
}
|
||||
Reference in New Issue
Block a user