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.

102 lines
2.4 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 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<MemberCardItem>
{
/// <summary>
/// 是否启用会员卡
/// </summary>
[JsonProperty(PropertyName = "enable")]
public bool Enable { get; set; } = true;
/// <summary>
/// 默认会员识别方式
/// </summary>
[JsonProperty(PropertyName = "default")]
public MemberCardReadType DefaultType { get; set; } = MemberCardReadType.;
/// <summary>
/// 默认启用会员卡介质
/// </summary>
[JsonProperty(PropertyName = "type")]
public List<MemberCardType> ListType { get; set; }
/// <summary>
/// 会员身份识别方式
/// </summary>
[JsonProperty(PropertyName = "read")]
public List<MemberCardReadType> ListReader { get; set; }
/// <summary>
/// 会员卡功能设置
/// </summary>
[JsonProperty(PropertyName = "function")]
public List<MemberCardFunctions> Function { get; set; }
/// <summary>
/// 免密支付1-是0-否
/// </summary>
[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));
}
}
/// <summary>
/// 会员的功能
/// </summary>
public enum MemberCardFunctions
{
= 1,
= 2,
= 3
}
/// <summary>
/// 会员卡的读卡方式
/// </summary>
public enum MemberCardReadType
{
IC = 1,
= 2,
= 3
}
/// <summary>
/// 会员卡介质
/// </summary>
public enum MemberCardType
{
Magnetic = 1,
Mifare = 2
}
/// <summary>
/// 会员卡号类型
/// </summary>
public enum MemberCardNoType
{
= 0,
= 1,
= 2,
= 3,
= 4
}
}