using Newtonsoft.Json;
using NPoco;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace POSV.ShoppingCart
{
///
/// 促销规则
///
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class PromotionEntity
{
///
/// 促销类型
///
[JsonProperty(PropertyName = "type")]
public PromotionType Type { get; set; }
///
/// 促销ID
///
[JsonProperty(PropertyName = "promotionId")]
public string PromotionId { get; set; }
///
/// 优惠金额
///
[JsonProperty(PropertyName = "discountAmount")]
public decimal DiscountAmount { get; set; }
///
/// 是否整单促销
///
[JsonProperty(PropertyName = "isOrder")]
public bool IsOrder { get; set; } = false;
///
/// 促销描述
///
[JsonProperty(PropertyName = "promotionDesc")]
public string PromotionDesc { get; set; }
///
/// 促销商品信息
///
[JsonProperty(PropertyName = "products")]
public List Products { get; set; }
///
/// 是否验券(0否1是)
///
[JsonProperty(PropertyName = "voucherFlag")]
public int VoucherFlag { get; set; }
///
/// 优惠券ID
///
[Ignore]
public string CouponId { get; set; }
}
///
/// 促销赠送商品
///
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class PromotionGiveProduct
{
///
/// 商品ID
///
[JsonProperty(PropertyName = "productId")]
public string ProductId { get; set; }
///
/// 商品规格ID
///
[JsonProperty(PropertyName = "specId")]
public string SpecId { get; set; }
///
/// 商品数量
///
[JsonProperty(PropertyName = "quantity")]
public decimal Quantity { get; set; }
}
}