| | 1 | | using DCLServices.WearablesCatalogService; |
| | 2 | | using System; |
| | 3 | |
|
| | 4 | | namespace DCL.Backpack |
| | 5 | | { |
| | 6 | | public record WearableGridItemModel |
| | 7 | | { |
| 207 | 8 | | public string WearableId { get; set; } |
| 181 | 9 | | public bool IsSelected { get; set; } |
| 189 | 10 | | public bool IsEquipped { get; set; } |
| 235 | 11 | | public string ImageUrl { get; set; } |
| 138 | 12 | | public string Amount { get; set; } |
| 174 | 13 | | public NftRarity Rarity { get; set; } |
| 174 | 14 | | public bool IsNew { get; set; } |
| 140 | 15 | | public string Category { get; set; } |
| 164 | 16 | | public bool UnEquipAllowed { get; set; } = true; |
| 632 | 17 | | public bool IsCompatibleWithBodyShape { get; set; } = true; |
| 140 | 18 | | public bool IsSmartWearable { get; set; } = false; |
| | 19 | |
|
| | 20 | | public virtual bool Equals(WearableGridItemModel other) |
| | 21 | | { |
| 31 | 22 | | if (ReferenceEquals(null, other)) return false; |
| 31 | 23 | | return WearableId == other.WearableId |
| | 24 | | && IsSelected == other.IsSelected |
| | 25 | | && IsEquipped == other.IsEquipped |
| | 26 | | && ImageUrl == other.ImageUrl |
| | 27 | | && Rarity == other.Rarity |
| | 28 | | && IsNew == other.IsNew |
| | 29 | | && Category == other.Category |
| | 30 | | && UnEquipAllowed == other.UnEquipAllowed |
| | 31 | | && IsCompatibleWithBodyShape == other.IsCompatibleWithBodyShape |
| | 32 | | && IsSmartWearable == other.IsSmartWearable; |
| | 33 | | } |
| | 34 | |
|
| | 35 | | public override int GetHashCode() |
| | 36 | | { |
| 0 | 37 | | var hashCode = new HashCode(); |
| 0 | 38 | | hashCode.Add(WearableId); |
| 0 | 39 | | hashCode.Add(IsSelected); |
| 0 | 40 | | hashCode.Add(IsEquipped); |
| 0 | 41 | | hashCode.Add(ImageUrl); |
| 0 | 42 | | hashCode.Add((int) Rarity); |
| 0 | 43 | | hashCode.Add(IsNew); |
| 0 | 44 | | hashCode.Add(Category); |
| 0 | 45 | | hashCode.Add(UnEquipAllowed); |
| 0 | 46 | | hashCode.Add(IsCompatibleWithBodyShape); |
| 0 | 47 | | hashCode.Add(IsSmartWearable); |
| 0 | 48 | | return hashCode.ToHashCode(); |
| | 49 | | } |
| | 50 | | } |
| | 51 | | } |