| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- namespace qdr.app.studiou.orders2printpack.ProductStorage
- {
- public class VariantDto : IIdentifierGetter
- {
- public string Name { get; set; } = string.Empty;
- public decimal Price { get; set; } = 0;
- public int QuantityMinimum { get; set; } = 0;
- public int QuantityMaximum { get; set; } = 0;
- public void CopyTo(VariantDto destination)
- {
- destination.Name = Name;
- destination.Price = Price;
- destination.QuantityMaximum = QuantityMaximum;
- destination.QuantityMinimum = QuantityMinimum;
- }
- public string GetIdentifier()
- {
- if (string.IsNullOrWhiteSpace(Name))
- return string.Empty;
-
- return Name.ToLower();
- }
- public override string ToString()
- {
- if (string.IsNullOrWhiteSpace(Name))
- return string.Empty;
- return Name.ToLower();
- }
- bool IEquatable<IIdentifierGetter>.Equals(IIdentifierGetter? other)
- {
- return other != null && other.GetIdentifier() == GetIdentifier();
- }
- }
-
- }
|