Feature repricing min max (#10)

amazon settlement import/export improvements
This commit is contained in:
2020-05-01 09:08:23 +01:00
committed by GitHub
parent 56647c7648
commit 43d61c2ef8
118 changed files with 7930 additions and 3021 deletions

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace bnhtrade.Core.Model.Product
{
public class CompetitivePrice
{
private bool? priceIsEstimated;
private decimal? price = null;
public int ProductId { get; set; }
public int ConditionId { get; set; }
public decimal Price
{
get { return price.GetValueOrDefault(); }
set { price = value; }
}
public bool PriceIsSet
{
get { return price != null; }
}
public DateTime PriceDatetime { get; set; }
public bool PriceIsEstimated
{
get { return priceIsEstimated.GetValueOrDefault(); }
set { priceIsEstimated = value; }
}
public bool PriceIsEstimatedIsSet
{
get { return priceIsEstimated != null; }
}
public CompetitivePrice Clone()
{
var clone = new CompetitivePrice();
clone.ConditionId = ConditionId;
if (PriceIsSet) { clone.Price = Price; }
clone.PriceDatetime = PriceDatetime;
if (PriceIsEstimatedIsSet) { clone.priceIsEstimated = PriceIsEstimated; }
clone.ProductId = ProductId;
return clone;
}
}
}