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