61 lines
1.3 KiB
C#
61 lines
1.3 KiB
C#
using Core.Abstractions.Models;
|
|
using Core.DomainObjects;
|
|
using Core.DomainObjects.Documents;
|
|
using Core.DomainObjects.L10n;
|
|
using ExtensionMethods;
|
|
using WeatherForecast.Models.Abstractions;
|
|
|
|
namespace WeatherForecast.Models.Requests {
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class PostShopItemRequestModel : 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
|
|
};
|
|
}
|
|
}
|