65 lines
1.7 KiB
C#
65 lines
1.7 KiB
C#
using DomainObjects.Documents;
|
|
using DomainObjects.Enumerations;
|
|
using WeatherForecast.Models.Abstractions.PostItem.Responses;
|
|
|
|
namespace WeatherForecast.Models.Shop.Responses {
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class ShopItemResponseModel : PostItemResponseModelBase<ShopDocument> {
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string Sku { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? Rating { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal Price { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? NewPrice { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public uint? Quantity { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="shopCatalogItem"></param>
|
|
/// <param name="categories"></param>
|
|
public ShopItemResponseModel(ShopDocument shopCatalogItem, List<CategoryDocument> categories) : base(shopCatalogItem, categories) {
|
|
Sku = shopCatalogItem.Sku;
|
|
Rating = shopCatalogItem.Rating;
|
|
Price = shopCatalogItem.Price;
|
|
NewPrice = shopCatalogItem.NewPrice;
|
|
Quantity = shopCatalogItem.Quantity;
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="shopCatalogItem"></param>
|
|
/// <param name="categories"></param>
|
|
/// <param name="locale"></param>
|
|
public ShopItemResponseModel(ShopDocument shopCatalogItem, List<CategoryDocument> categories, Locales locale) : base(shopCatalogItem, categories, locale) {
|
|
Sku = shopCatalogItem.Sku;
|
|
Rating = shopCatalogItem.Rating;
|
|
Price = shopCatalogItem.Price;
|
|
NewPrice = shopCatalogItem.NewPrice;
|
|
Quantity = shopCatalogItem.Quantity;
|
|
}
|
|
}
|
|
}
|