using System; using System.Collections.Generic; using System.Linq; using System.Text; using Newtonsoft.Json; using POSV.Utils; namespace POSV.Bean { [Serializable] [JsonObject(MemberSerialization.OptIn)] public class MemberCardItem : IEquatable { /// /// 是否启用会员卡 /// [JsonProperty(PropertyName = "enable")] public bool Enable { get; set; } = true; /// /// 默认会员识别方式 /// [JsonProperty(PropertyName = "default")] public MemberCardReadType DefaultType { get; set; } = MemberCardReadType.手机号码; /// /// 默认启用会员卡介质 /// [JsonProperty(PropertyName = "type")] public List ListType { get; set; } /// /// 会员身份识别方式 /// [JsonProperty(PropertyName = "read")] public List ListReader { get; set; } /// /// 会员卡功能设置 /// [JsonProperty(PropertyName = "function")] public List Function { get; set; } /// /// 免密支付,1-是,0-否 /// [JsonProperty(PropertyName = "pay")] public int PaymentType { get; set; } = 1; public bool Equals(MemberCardItem other) { if (other == null) { return false; } return JsonUtils.Serialize(this).Equals(JsonUtils.Serialize(other)); } } /// /// 会员的功能 /// public enum MemberCardFunctions { 会员价优惠 = 1, 会员积分及兑换 = 2, 会员储值及消费 = 3 } /// /// 会员卡的读卡方式 /// public enum MemberCardReadType { 磁条卡或IC卡 = 1, 手机号码 = 2, 电子卡 = 3 } /// /// 会员卡介质 /// public enum MemberCardType { Magnetic = 1, Mifare = 2 } /// /// 会员卡号类型 /// public enum MemberCardNoType { 未知 = 0, 真实卡号 = 1, 手机号 = 2, 电子卡号 = 3, 卡面号 = 4 } }