You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

307 lines
8.3 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace POSV.Entity.Pormotion
{
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class ElectronCoupon
{
/// <summary>
/// 租户编码
/// </summary>
[JsonProperty(PropertyName = "tenantId")]
public string TenantId { get; set; }
/// <summary>
/// 卡券主键id
/// </summary>
[JsonProperty(PropertyName = "couponId")]
public string CouponId { get; set; }
/// <summary>
/// 微信一类卡券的唯一标识
/// </summary>
[JsonProperty(PropertyName = "cardId")]
public string CardId { get; set; }
/// <summary>
/// 卡券类别(折扣券:DISCOUNT;代金券:CASH;兑换券:GIFT)
/// </summary>
[JsonProperty(PropertyName = "cardType")]
public MemberCouponType CardType { get; set; }
/// <summary>
/// 卡券标题
/// </summary>
[JsonProperty(PropertyName = "title")]
public string Title { get; set; }
/// <summary>
/// 卡券副标题
/// </summary>
[JsonProperty(PropertyName = "subTitle")]
public string SubTitle { get; set; }
/// <summary>
/// 卡券code码唯一码
/// </summary>
[JsonProperty(PropertyName = "code")]
public string Code { get; set; }
/// <summary>
/// 卡券有效开始时间yyyy-MM-dd HH:mm:ss
/// </summary>
[JsonProperty(PropertyName = "beginTimestamp")]
public string BeginTimestamp { get; set; }
/// <summary>
/// 卡券有效结束时间yyyy-MM-dd HH:mm:ss
/// </summary>
[JsonProperty(PropertyName = "endTimestamp")]
public string EndTimestamp { get; set; }
/// <summary>
/// 卡券时段类型(0-表示不限制1-表示限制)
/// </summary>
[JsonProperty(PropertyName = "limitType")]
public int LimitType { get; set; }
/// <summary>
/// 卡券可用时段(周一:MONDAY,周二:TUESDAY,周三:WEDNESDAY,周四:THURSDAY,周五:FRIDAY,周六:SATURDAY,周日:SUNDAY)
/// </summary>
[JsonProperty(PropertyName = "timeLimit")]
public string TimeLimit { get; set; }
/// <summary>
/// 起用金额(代金券专用,单位:分)
/// </summary>
[JsonProperty(PropertyName = "leastCost")]
public int LeastCost { get; set; }
/// <summary>
/// 减免金额(代金券专用,单位:分)
/// </summary>
[JsonProperty(PropertyName = "reduceCost")]
public int ReduceCost { get; set; }
/// <summary>
/// 打折额度(折扣券专用 1-9.9之间)
/// </summary>
[JsonProperty(PropertyName = "discount")]
public decimal Discount { get; set; }
/// <summary>
/// 赠送类别(1-礼品 2-商品)
/// </summary>
[JsonProperty(PropertyName = "giftType")]
public int GiftType { get; set; }
/// <summary>
/// 发放方式(1-pos核销 2-总部配送)
/// </summary>
[JsonProperty(PropertyName = "grantType")]
public int GrantType { get; set; }
/// <summary>
/// 兑换物品信息
/// </summary>
[JsonProperty(PropertyName = "gift")]
public string Gift { get; set; }
/// <summary>
/// 领取会员ID
/// </summary>
[JsonProperty(PropertyName = "memberId")]
public string MemberId { get; set; }
/// <summary>
/// 领取卡号
/// </summary>
[JsonProperty(PropertyName = "cardNo")]
public string CardNo { get; set; }
/// <summary>
/// 领取人手机号
/// </summary>
[JsonProperty(PropertyName = "mobile")]
public string Mobile { get; set; }
/// <summary>
/// 领取时间yyyy-MM-dd HH:mm:ss
/// </summary>
[JsonProperty(PropertyName = "receiveTime")]
public string ReceiveTime { get; set; }
/// <summary>
/// 核销时间yyyy-MM-dd HH:mm:ss
/// </summary>
[JsonProperty(PropertyName = "consumeTime")]
public string ConsumeTime { get; set; }
/// <summary>
/// 状态(0-当前门店不可用 1-当前门店可用)
/// </summary>
[JsonProperty(PropertyName = "useFlag")]
public int UseFlag { get; set; }
/// <summary>
/// 状态(1-领取 2-已核销 3-已失效)
/// </summary>
[JsonProperty(PropertyName = "status")]
public int Status { get; set; }
/// <summary>
/// 不可用类型
/// </summary>
[JsonIgnore]
public int ErrorType { get; set; }
/// <summary>
/// 不可用描述
/// </summary>
[JsonIgnore]
public string ErrorInfo { get; set; }
/// <summary>
/// 实际抵扣金额
/// </summary>
[JsonProperty(PropertyName = "realMoney")]
public decimal RealMoney { get; set; }
}
/// <summary>
/// 礼品信息
/// </summary>
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class CouponGift
{
/// <summary>
/// 物品兑换数量
/// </summary>
[JsonProperty(PropertyName = "num")]
public decimal Num { get; set; }
/// <summary>
/// 物品编码
/// </summary>
[JsonProperty(PropertyName = "no")]
public string No { get; set; }
/// <summary>
/// 物品名称
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// 物品条码
/// </summary>
[JsonProperty(PropertyName = "barcode")]
public string Barcode { get; set; }
/// <summary>
/// 物品规格
/// </summary>
[JsonProperty(PropertyName = "spec")]
public string Spec { get; set; }
/// <summary>
/// 物品单位
/// </summary>
[JsonProperty(PropertyName = "unit")]
public string Unit { get; set; }
/// <summary>
/// 物品价值
/// </summary>
[JsonProperty(PropertyName = "worth")]
public decimal Worth { get; set; }
/// <summary>
/// 物品成本
/// </summary>
[JsonProperty(PropertyName = "cost")]
public decimal Cost { get; set; }
/// <summary>
/// 备注
/// </summary>
[JsonProperty(PropertyName = "memo")]
public string Memo { get; set; }
}
/// <summary>
/// 礼品信息
/// </summary>
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class CouponProductGift
{
/// <summary>
/// 物品兑换数量
/// </summary>
[JsonProperty(PropertyName = "num")]
public decimal Num { get; set; }
/// <summary>
/// 物品编码
/// </summary>
[JsonProperty(PropertyName = "specId")]
public string SpecId { get; set; }
/// <summary>
/// 商品ID
/// </summary>
[JsonProperty(PropertyName = "productId")]
public string ProductId { get; set; }
/// <summary>
/// 商品编号
/// </summary>
[JsonProperty(PropertyName = "productNo")]
public string ProductNo { get; set; }
/// <summary>
/// 商品名称
/// </summary>
[JsonProperty(PropertyName = "productName")]
public string ProductName { get; set; }
/// <summary>
/// 规格名称
/// </summary>
[JsonProperty(PropertyName = "specName")]
public string SpecName { get; set; }
/// <summary>
/// 商品单位
/// </summary>
[JsonProperty(PropertyName = "unitName")]
public string UnitName { get; set; }
}
/// <summary>
/// 会员券类型
/// </summary>
public enum MemberCouponType
{
//折扣券
DISCOUNT = 0,
//代金券
CASH = 1,
//兑换券
GIFT = 2,
//单品券
PRODUCT = 3,
}
}