mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-21 15:27:15 +00:00
Feature repricing min max (#10)
amazon settlement import/export improvements
This commit is contained in:
53
src/bnhtrade.Core/Model/Product/CompetitivePrice.cs
Normal file
53
src/bnhtrade.Core/Model/Product/CompetitivePrice.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user