reactredux/webapi/WeatherForecast/Models/Requests/PutShopItemRequestModel.cs

32 lines
856 B
C#

using WeatherForecast.Models.Abstractions;
using Core.DomainObjects;
using Core.DomainObjects.Documents;
namespace WeatherForecast.Models.Requests {
public class PutShopItemRequestModel : PostItemRequestModelBase<ShopItem> {
public string BrandName { get; set; }
public decimal? Rating { get; set; }
public decimal Price { get; set; }
public decimal? NewPrice { get; set; }
public uint Quantity { get; set; }
public override ShopItem ToDomainObject() => new ShopItem {
L10n = L10n.Select(x => x.ToDomainObject()).ToList(),
// Images
// Author
Created = DateTime.UtcNow,
Tags = Tags,
Categories = Categories,
FamilyFriendly = FamilyFriendly,
BrandName = BrandName,
Rating = Rating,
Price = Price,
NewPrice = NewPrice,
Quantity = Quantity
};
}
}