You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace BBWY.Client.Models
|
|
{
|
|
/// <summary>
|
|
/// 采购商
|
|
/// </summary>
|
|
public class Purchaser : NotifyObject
|
|
{
|
|
private int skuUseCount;
|
|
|
|
public string Id { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
|
|
/// <summary>
|
|
/// 使用该采购商的SKU数量
|
|
/// </summary>
|
|
public int SkuUseCount { get => skuUseCount; set { Set(ref skuUseCount, value); } }
|
|
|
|
public string ProductId { get; set; }
|
|
|
|
public string Location { get; set; }
|
|
|
|
public Platform Platform { get; set; }
|
|
}
|
|
|
|
public class PurchaserComparer : IEqualityComparer<Purchaser>
|
|
{
|
|
public bool Equals([AllowNull] Purchaser x, [AllowNull] Purchaser y)
|
|
{
|
|
if (Object.ReferenceEquals(x, y)) return true;
|
|
|
|
if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null))
|
|
return false;
|
|
|
|
return x?.Id == y?.Id;
|
|
}
|
|
|
|
public int GetHashCode([DisallowNull] Purchaser obj)
|
|
{
|
|
return base.GetHashCode();
|
|
}
|
|
}
|
|
}
|
|
|