using System; using System.Collections.Generic; using System.Linq; using System.Text; using Newtonsoft.Json; namespace POSV.Card { /// /// 统一收单-订单创建(获取交易参考号) /// [Serializable] [JsonObject(MemberSerialization.OptIn)] public class CardTradeCreateVoucherNoRequest { /// /// 商户订单号 /// [JsonProperty(PropertyName = "tradeNo")] public string TradeNo { get; set; } /// /// 批次号 /// [JsonProperty(PropertyName = "batchNo")] public string BatchNo { get; set; } /// /// 流水号 /// [JsonProperty(PropertyName = "serialNo")] public string SerialNo { get; set; } /// /// 订单生成时间 /// [JsonProperty(PropertyName = "saleDate")] public string SaleDate { get; set; } /// /// 订单标题 /// [JsonProperty(PropertyName = "subject")] public string Subject { get; set; } /// /// 对交易或商品的描述 /// [JsonProperty(PropertyName = "body")] public string Body { get; set; } /// /// 订单总金额(精确到分) /// [JsonProperty(PropertyName = "totalAmount")] public int TotalAmount { get; set; } /// /// 优惠总金额(精确到分) /// [JsonProperty(PropertyName = "discountAmount")] public int DiscountAmount { get; set; } /// /// 商品明细 /// [JsonProperty(PropertyName = "goodsDetails")] public List GoodsDetail { get; set; } /// /// 促销明细 /// [JsonProperty(PropertyName = "proDetails")] public List ProDetail { get; set; } /// /// 门店编号 /// [JsonProperty(PropertyName = "shopNo")] public string ShopNo { get; set; } /// /// 终端编号 /// [JsonProperty(PropertyName = "posNo")] public string PosNo { get; set; } /// /// 员工编号 /// [JsonProperty(PropertyName = "workerNo")] public string WorkerNo { get; set; } /// /// 终端标识(web、pos、wechat) /// [JsonProperty(PropertyName = "sourceSign")] public string SourceSign { get; set; } = "x86"; } /// /// 商品明细(参数值为JSON字符串) /// [Serializable] [JsonObject(MemberSerialization.OptIn)] public class GoodsDetail { /// /// 商品编码 /// [JsonProperty(PropertyName = "goodsId")] public string GoodsId { get; set; } /// /// 商品名称 /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// 规格 /// [JsonProperty(PropertyName = "spec")] public string Spec { get; set; } /// /// 数量 /// [JsonProperty(PropertyName = "quantity")] public decimal Quantity { get; set; } /// /// 数量 /// [JsonProperty(PropertyName = "price")] public decimal Price { get; set; } /// /// 优惠金额 /// [JsonProperty(PropertyName = "discountMoney")] public decimal DiscountMoney { get; set; } /// /// 金额 /// [JsonProperty(PropertyName = "money")] public decimal Money { get; set; } /// /// 积分 /// [JsonProperty(PropertyName = "point")] public decimal Point { get; set; } /// /// 享受N种促销 /// [JsonProperty(PropertyName = "promotion")] public string Promotion { get; set; } } /// /// 促销明细(参数值为JSON字符串) /// [Serializable] [JsonObject(MemberSerialization.OptIn)] public class ProDetail { /// /// 促销类型 /// [JsonProperty(PropertyName = "proType")] public string ProType { get; set; } /// /// 促销方案 /// [JsonProperty(PropertyName = "ticketNo")] public string TicketNo { get; set; } /// /// 支付金额 /// [JsonProperty(PropertyName = "money")] public decimal Money { get; set; } /// /// 优惠金额 /// [JsonProperty(PropertyName = "discount")] public decimal Discount { get; set; } } }