reactredux/webapi/WeatherForecast/Models/Responses/GetShopItemResponseModel.cs

24 lines
852 B
C#

using Core.DomainObjects.Documents;
using Core.DomainObjects.Pages;
using WeatherForecast.Models.Abstractions;
namespace WeatherForecast.Models {
public class GetShopItemResponseModel : PostItemResponseModelBase<ShopItem> {
public List<ImageModel>? Images { get; set; }
public string Sku { get; set; }
public decimal? Rating { get; set; }
public double Price { get; set; }
public double? NewPrice { get; set; }
public uint? Quantity { get; set; }
public GetShopItemResponseModel(ShopItem shopCatalogItem) : base(shopCatalogItem) {
Images = shopCatalogItem.Images.Select(x => new ImageModel(x)).ToList();
Sku = shopCatalogItem.Sku;
Rating = shopCatalogItem.Rating;
Price = shopCatalogItem.Price;
NewPrice = shopCatalogItem.NewPrice;
Quantity = shopCatalogItem.Quantity;
}
}
}