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

59 lines
1.2 KiB
C#

using WeatherForecast.Models.Abstractions;
using Core.DomainObjects;
using Core.DomainObjects.Documents;
namespace WeatherForecast.Models.Requests {
/// <summary>
///
/// </summary>
public class PutShopItemRequestModel : PostItemRequestModelBase<ShopItem> {
/// <summary>
///
/// </summary>
public string BrandName { 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>
/// <returns></returns>
public override ShopItem ToDomainObject() => new() {
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
};
}
}