using Elwig.Models.Entities; using System; namespace Elwig.Helpers.Billing { public class Varibute : IComparable { public WineVar? Variety { get; } public WineAttr? Attribute { get; } public int? AssignedGraphId { get; set; } public int? AssignedAbgewGraphId { get; set; } public string Listing => $"{Variety?.SortId}{Attribute?.AttrId}"; public string FullName => $"{Variety?.Name}" + (Variety != null && Attribute != null ? " " : "") + $"{Attribute?.Name}"; public Varibute(WineVar? var, WineAttr? attr) { Variety = var; Attribute = attr; } public override string ToString() { return Listing; } public int CompareTo(Varibute? other) { return Listing.CompareTo(other?.Listing); } } }