using Newtonsoft.Json;
using POSV.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace POSV.Bean
{
///
/// 电子秤参数
///
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class SteelyardParam : IEquatable
{
///
/// 电子秤型号
///
[JsonProperty(PropertyName = "name")]
public SteelyardBrandEnum Name { get; set; } = SteelyardBrandEnum.None;
///
/// 端口
///
[JsonProperty(PropertyName = "port")]
public string Port { get; set; } = "COM1";
///
/// 波特率
///
[JsonProperty(PropertyName = "baud")]
public int Baud { get; set; } = 9600;
public bool Equals(SteelyardParam other)
{
if (other == null)
{
return false;
}
return JsonUtils.Serialize(this).Equals(JsonUtils.Serialize(other)); ;
}
}
}